Add note about similarity between class methods and Delphi's virtual

class methods.
This commit is contained in:
Guido van Rossum 2001-08-07 15:44:15 +00:00
parent 4673cd0bba
commit 21a691e0e5
1 changed files with 6 additions and 4 deletions

View File

@ -381,10 +381,12 @@ Static methods and class methods
receive an implicit first argument that is the *class* for which
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
serve a similar purpose. (Python also has real metaclasses, and
perhaps methods 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:
serve a similar purpose. According to Armin Rigo, they are
similar to "virtual class methods" in Borland Pascal dialect
Delphi. (Python also has real metaclasses, and perhaps methods
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: