Antoon Pardon <[EMAIL PROTECTED]> wrote: > Yes it is inconsistent with the rest of python. That you found > a subset in which it is consistent doesn't change that. > > And what if you do: > > c = C() > c.f = g > > > The fact that a function in a class performs a lot of magic if > it is called through an instance, that isn't performed otherwise, > makes python inconsistent here. You may like the arrangement > (and it isn't such a big deal IMO) but that doesn't make it consistent.
Any descriptor (be it a function or otherwise) has its __get__ method called, when _accessed_ by attribute syntax, if and only if that descriptor is in a class. _ALL_ of Python is perfectly consistent on this point, and if I didn't already know the kind of crazy and obviously false assertions that you post *QUITE* consistently, I would be astonished to see you claim otherwise. Knowing your posts, this latest idiocy is perfectly "par for the course". "A lot of magic" is simply a stupid and imprecise way to describe "the __get__ method gets called". Saying that any of this happens when the function is CALLED is a definitely more serious mistake, since it's absolutely obvious that the __get__ method is called when the function (or any other attribute) is *ACCESSED* -- the call operation (on whatever object __get__ returns) happens AFTERWARDS. Why you, and a few other habitual trolls, keep lowering the signal to noise ratio of this newsgroup with your blatherings, I don't know; I'm sure this behavior must be giving you guys some kind of satisfaction. Whether the damage you do to the clarity of the issues, and to the understanding of newbies who are unfortunate enough to read and trust the many imprecise and/or utterly false assertions you keep making, with totally unjustified airs of competence, is part of your jollies, or just a side effect you don't care a whit about, I don't know either. Guess I'll just killfile you for another month now -- wish MacSOUP had a simple way to to permanent killfiling, since it's pretty obvious by now that it's quite unlikely you'll even post anything worthwhile at all. Alex -- http://mail.python.org/mailman/listinfo/python-list