This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients rhettinger, serhiy.storchaka
Date 2019-08-26.08:05:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566806715.9.0.442575224012.issue37949@roundup.psfhosted.org>
In-reply-to
Content
Guido's Time Machine strikes back.

>>> import gc
>>> def f(): pass
... 
>>> gc.get_referents(f)
[<code object f at 0x7f45f5d366c0, file "<stdin>", line 1>, {'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__spec__': None, '__annotations__': {}, '__builtins__': <module 'builtins' (built-in)>, 'gc': <module 'gc' (built-in)>, 'f': <function f at 0x7f45f5dd3b90>}, '__main__', None, 'f', 'f']
>>> f.__annotations__
{}
>>> gc.get_referents(f)
[<code object f at 0x7f45f5d366c0, file "<stdin>", line 1>, {'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__spec__': None, '__annotations__': {}, '__builtins__': <module 'builtins' (built-in)>, 'gc': <module 'gc' (built-in)>, 'f': <function f at 0x7f45f5dd3b90>}, '__main__', None, 'f', {}, 'f']
History
Date User Action Args
2019-08-26 08:05:15serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger
2019-08-26 08:05:15serhiy.storchakasetmessageid: <1566806715.9.0.442575224012.issue37949@roundup.psfhosted.org>
2019-08-26 08:05:15serhiy.storchakalinkissue37949 messages
2019-08-26 08:05:15serhiy.storchakacreate