Resolving declaring class of a method at runtime
janne.t.harkonen at gmail.com
Sat Nov 17 08:08:48 CET 2007
On Nov 16, 2007 10: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
> >> 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.
Actually, the I did not think about old and new classes when typing the
example. So you are correct in that I have a bad habit of making old style
classes whenever I experiment with something in the console.
I am sorry to have wasted your precious time in such oafish manner.
I am still grateful for the advice though :)
More information about the Python-list