Add note about similarity between class methods and Delphi's virtual
class methods.
This commit is contained in:
parent
4673cd0bba
commit
21a691e0e5
10
pep-0252.txt
10
pep-0252.txt
|
@ -381,10 +381,12 @@ Static methods and class methods
|
||||||
receive an implicit first argument that is the *class* for which
|
receive an implicit first argument that is the *class* for which
|
||||||
they are invoked. This has no C++ or Java equivalent, and is not
|
they are invoked. This has no C++ or Java equivalent, and is not
|
||||||
quite the same as what class methods are in Smalltalk, but may
|
quite the same as what class methods are in Smalltalk, but may
|
||||||
serve a similar purpose. (Python also has real metaclasses, and
|
serve a similar purpose. According to Armin Rigo, they are
|
||||||
perhaps methods defined in a metaclass have more right to the name
|
similar to "virtual class methods" in Borland Pascal dialect
|
||||||
"class method"; but I expect that most programmers won't be using
|
Delphi. (Python also has real metaclasses, and perhaps methods
|
||||||
metaclasses.) Here's an example:
|
defined in a metaclass have more right to the name "class method";
|
||||||
|
but I expect that most programmers won't be using metaclasses.)
|
||||||
|
Here's an example:
|
||||||
|
|
||||||
class C:
|
class C:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue