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

2012-01-11 Thread Roundup Robot
Roundup Robot 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 http://hg.python.org/cpython/rev/

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

2012-01-09 Thread INADA Naoki
INADA Naoki 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 containing its >

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

2012-01-09 Thread Terry J. Reedy
Terry J. Reedy 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 definition. (The class its

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

2011-03-18 Thread Terry J. Reedy
Terry J. Reedy 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 ___ Pytho

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

2011-03-11 Thread R. David Murray
R. David Murray 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 module parrot.py, a

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

2011-03-11 Thread Éric Araujo
Éric Araujo 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

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

2011-03-06 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- nosy: +santa4nt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

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

2011-03-06 Thread INADA Naoki
Changes by INADA Naoki : -- 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 _

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

2011-03-06 Thread INADA Naoki
New submission from INADA Naoki : 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 us