Bruno Desthuilliers wrote: > 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.
<Ironic> Hi, I'm new to Python, I don't even fully know the language, never done a full project in Python. What's more, probably I'll never will. But that's not the point, the point is I want YOU people to modify the language you know in and out, the program with which you've done many systems, I want you to change it to suit my whims, so that I'll be comfortable with the 3 ten liners I'll write. TIA </Ironic> -- http://mail.python.org/mailman/listinfo/python-list