B
Bruno Desthuilliers
Erik Jones a écrit :
Being "the expected norm" is not enough to qualify has "being the right
thing to do".
Until you want to dynamically add some generic function taking an object
as first arg as a method of a class or instance. Exposing most of the
inner working of it's object model is one of the greatest strength of
Python. And that's one of the reasons I (and probably other people here)
like this language.
If you really think the only rationale for this is "just because", then
you're missing something IMHO.
Yes, that is really the crux of the issue, though. While the former
may be syntactic sugar for the latter, once any syntactic sugar has
become prevalent enough, it becomes the expected norm
Being "the expected norm" is not enough to qualify has "being the right
thing to do".
and the latter
becomes clutter or, at best, awkward.
Until you want to dynamically add some generic function taking an object
as first arg as a method of a class or instance. Exposing most of the
inner working of it's object model is one of the greatest strength of
Python. And that's one of the reasons I (and probably other people here)
like this language.
It's something that really just
takes a little use until you get to the point where you don't usually
think of it but, every so often, the thought creeps in. I'm not
complaining, just pointing out if you step out of this particular box,
you'll realize that it really is a pointless one. Saying, "because
that's how Python does it" may be the only valid reason, but that
argument is about on par with a six year old's "just because...".
If you really think the only rationale for this is "just because", then
you're missing something IMHO.