[issue11418] Method's global scope is module containing function definition, not class.

INADA Naoki report at bugs.python.org
Mon Mar 7 00:28:21 CET 2011


New submission from INADA Naoki <songofacandy at gmail.com>:

http://docs.python.org/py3k/tutorial/classes.html#random-remarks
> Methods may reference global names in the same way as ordinary
> functions. The global scope associated with a method is the module
> containing the class definition. (The class itself is never used
> as a global scope.)

Method's function can be defined outside the module containing class
definition. And then the method's global scope is module containing
method's function definition.

----------
messages: 130201
nosy: naoki
priority: normal
severity: normal
status: open
title: Method's global scope is module containing function definition, not class.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11418>
_______________________________________


More information about the Python-bugs-list mailing list