Python 3K or Python 2.9?
Bruno Desthuilliers
bdesth.quelquechose at free.quelquepart.fr
Thu Sep 13 13:52:47 EDT 2007
More information about the Python-list mailing list
Thu Sep 13 13:52:47 EDT 2007
- Previous message (by thread): Python 3K or Python 2.9?
- Next message (by thread): Python 3K or Python 2.9?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
TheFlyingDutchman a écrit : > Well I'm with Bruce Eckel - there shouldn't be any argument for the > object in the class method parameter list. def fun(obj, *args, **kw): # generic code here that do something with obj import some_module some_module.SomeClass.fun = fun This is why uniformity is important. But anyway, I think it's quite clear that Python won't drop the explicit self, so it looks like you have to live with it or choose another language. > Bruce said that no other mainstream OO language is explicitly passing > the object as a parameter to class methods. to methods. class methods gets the class as first parameter. Anyway, there are a lot of things that Python doesn't do like "other mainstream OO languages", and that's a GoodThing. > What I would like to have seen added to class definitions was the > forced declaration of all object variables in the class outside of > methods. I don't like the fact that they have to be, and can be > created in any method on the fly. I definitively think you'd be happier with some other language.
- Previous message (by thread): Python 3K or Python 2.9?
- Next message (by thread): Python 3K or Python 2.9?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list