FEEDBACK WANTED: Type/class unification
Guido van Rossum
guido at python.org
Sun Jul 29 19:14:00 EDT 2001
Hernan M. Foffani <hfoffani at yahoo.com> writes:
> I hope this msg is not too far away from what you expected
> by "FEEDBACK WANTED".
This is great feedback -- it shows you read and understood this
sufficiently to find typos!
> If I understood the unification correctly, in
> http://www.python.org/2.2/descrintro.html where it reads:
> >>> print a.keys()
> [1, 2, 3, '__builtins__', 'x']
> the 3 is a typo, right?
Yup. I'll fix the example so that 3 is not a typo here. :-)
> And where it says,
> But notice this:
>
> class E(C):
> def foo(x, y): # override C.foo
> print "E.foo() called"
> C.foo(y)
>
> Isn't a call to "foo = classmethod(foo)" missing after that?
> If so, in the PEP the call is missing too.
Correct on both counts again.
> One minor suggestion:
> I think it would help if you set a convention for the name
> of the first argument in classmethods. Like self for standard
> methods. Well, even self can "work" here, too.
I think 'self' would be confusing. I'd like to propose 'cls'.
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-list
mailing list