Resolving declaring class of a method at runtime

Chris Mellon arkanes at gmail.com
Fri Nov 16 22:45:30 CET 2007


On Nov 16, 2007 2:51 PM, Steven D'Aprano
<steve at remove-this-cybersource.com.au> wrote:
> On Fri, 16 Nov 2007 19:02:25 +0200, Janne Härkönen
> wrote:
>
> >> X is an "old style" class. Most people probably shouldn't use old style
> >> classes, for various reasons. To use new style classes, you inherit
> >> from object:
> >
> > I am also aware of old and new style classes, this was the fastest way
> > to type it in console
>
> Ah, an optimization huh?
>
> So, by saving 1/2 a second by not typing "(object)" in your example code,
> the consequences are that I wasted my time explaining that you should use
> new style classes, and you wasted your time reading and responding to my
> explanation, and now I'm wasting my time *again* telling you off for
> wasting my time in the first place.
>
> There should be a term for "optimization" techniques that actually slow
> things down instead of speeding them up.


pessimization, of course.



More information about the Python-list mailing list