mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
Minor correction. #11418
This commit is contained in:
parent
e247928fed
commit
ea868d32a1
1 changed files with 2 additions and 2 deletions
|
|
@ -458,8 +458,8 @@ argument::
|
||||||
self.add(x)
|
self.add(x)
|
||||||
|
|
||||||
Methods may reference global names in the same way as ordinary functions. The
|
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
|
global scope associated with a method is the module containing its
|
||||||
definition. (The class itself is never used as a global scope.) While one
|
definition. (A class is never used as a global scope.) While one
|
||||||
rarely encounters a good reason for using global data in a method, there are
|
rarely encounters a good reason for using global data in a method, there are
|
||||||
many legitimate uses of the global scope: for one thing, functions and modules
|
many legitimate uses of the global scope: for one thing, functions and modules
|
||||||
imported into the global scope can be used by methods, as well as functions and
|
imported into the global scope can be used by methods, as well as functions and
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue