Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 10a5165103f9 by Terry Jan Reedy in branch '2.7':
Minor correction. Closes #11418
http://hg.python.org/cpython/rev/10a5165103f9
New changeset 32ea3675fba2 by Terry Jan Reedy in branch '3.2':
Minor correction. #11418
Terry J. Reedy tjre...@udel.edu added the comment:
This paragraph follows a discussion and example of the fact that methods do
*not* have to be defined within a class statement.
Any objections to changing
The global scope associated with a method is the module containing the class
INADA Naoki songofaca...@gmail.com added the comment:
Any objections to changing
The global scope associated with a method is the module containing the class
definition. (The class itself is never used as a global scope.)
to
The global scope associated with a method is the module
Terry J. Reedy tjre...@udel.edu added the comment:
Methods defined within a class may reference...
would make the tutorial correct without introducing the complication of methods
defined outside a class, let alone in another module.
--
nosy: +terry.reedy
Éric Araujo mer...@netwok.org added the comment:
I’m afraid I don’t understand “Method's function”. Could you rephrase, or give
a commented code example showing the bad behavior?
--
nosy: +eric.araujo
versions: -Python 2.6
___
Python tracker
R. David Murray rdmur...@bitdance.com added the comment:
If you do a def foo in module bar.py, and have a class FooFoo in bar.py, and
do:
FooFoo.myfoo = foo
and foo refers to an unbound variable, that variable will be looked up in
bar.py's global name space.
If instead the 'def foo' is in a
New submission from INADA Naoki songofaca...@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
Changes by INADA Naoki songofaca...@gmail.com:
--
assignee: - docs@python
components: +Documentation
nosy: +docs@python
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3
___
Python tracker rep...@bugs.python.org
Changes by Santoso Wijaya santoso.wij...@gmail.com:
--
nosy: +santa4nt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11418
___
___