File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -393,11 +393,12 @@ Functions
393393 ``sys.modules[obj.__module__].__dict__ `` and *locals * defaults
394394 to the *obj * class namespace.
395395 * If *obj * is a callable, *globals * defaults to
396- :attr: `obj.__globals__ <function.__globals__> `,
397- although if *obj * is a wrapped function (using
398- :func: `functools.update_wrapper `), a :class: `functools.partial ` object,
399- or a :class: `functools.partialmethod ` object,
400- it is unwrapped until a non-wrapped function is found.
396+ :attr: `obj.__globals__ <function.__globals__> `.
397+ If *obj * has a :attr: `~function.__wrapped__ ` attribute (such as functions
398+ decorated with :func: `functools.update_wrapper `), or if it is a
399+ :class: `functools.partial ` object, it is unwrapped by following the
400+ :attr: `!__wrapped__ ` attribute or :attr: `~functools.partial.func ` attribute
401+ repeatedly until a function with :attr: `~function.__globals__ ` is found.
401402
402403 Calling :func: `!get_annotations ` is best practice for accessing the
403404 annotations dict of any object. See :ref: `annotations-howto ` for
You can’t perform that action at this time.
0 commit comments