# PyPy Configuration[objspace.std.withshadowtracking]

PyPy Configuration[objspace.std.withshadowtracking]
general documentation config index command-line overview

# objspace.std.withshadowtracking

Contents

- Basic Option Information
- Description

back to parent

# Basic Option Information

- name: withshadowtracking
- description: track whether an instance attribute shadows a type attribute
- command-line: --objspace-std-withshadowtracking
- command-line for negation: --no-objspace-std-withshadowtracking
- option type: boolean option
- default: False
- requirements:
  - objspace.std.withmultidict must be set to 'True'
  - objspace.std.withtypeversion must be set to 'True'

# Description

Enable "shadow tracking". This means a special dict representation is used together with multidicts. This dict representation is used only for instance dictionaries. The instance dictionary tracks whether an instance attribute shadows an attribute of its class. This makes method calls slightly faster in the following way: When calling a method the first thing that is checked is the class dictionary to find descriptors. Usually, when a method is found, the instance dictionary is then checked for instance attributes shadowing the class attribute. If we know that there is no shadowing (since our instance dict tells us that) we can save this lookup on the instance dictionary.