Nick Craig-Wood wrote:
Nick Coghlan <[EMAIL PROTECTED]> wrote:
Exactly. My advice is to use new-style classes unless you have a
reason not to (if you're inheriting from a builtin type, then there
is no need to inherit from object as well - the builtin types
already have the correct basic type).
Ex
Nick Coghlan <[EMAIL PROTECTED]> wrote:
> Exactly. My advice is to use new-style classes unless you have a
> reason not to (if you're inheriting from a builtin type, then there
> is no need to inherit from object as well - the builtin types
> already have the correct basic type).
Except for Ex
Frans Englich wrote:
On Wednesday 26 January 2005 21:24, M.E.Farmer wrote:
Hello Frans,
What you are seeing is a step on the path to unification of types and
classes.
I changed all base classes in my project to inherit object. There appears to
be no reason to not do it, AFAICT.
Exactly. My advice
On Wednesday 26 January 2005 21:24, M.E.Farmer wrote:
> Hello Frans,
> What you are seeing is a step on the path to unification of types and
> classes.
I changed all base classes in my project to inherit object. There appears to
be no reason to not do it, AFAICT.
Thanks,
Frans
Frans Englich wrote:
What is the difference between inherting form object, and not doing it?
Although this doesn't provide a description of all the implications,
it does give you the basic answer to the question and you can easily
do further research to learn more:
http://www.python.org/doc/2.2.1/
> What is the difference between inherting form object, and not doing it? E.g,
> what's the difference between the two following classes?
>
> class foo:
> pass
>
> class bar(object):
> pass
>
> Sometimes people inherit from it, and sometimes not. I don't see a pattern in
> their choic
Hello Frans,
What you are seeing is a step on the path to unification of types and
classes.
Now we have that clear ;)
Classes that inherit from object are 'new style classes'.
They were introduced in 2.2 and they have different internal methods.
The ones that have no declaration is an 'old style cl
(Picking up a side track of the "python without OO" thread.)
On Wednesday 26 January 2005 11:01, Neil Benn wrote:
> I say this because you do need to be aware of the
> 'mythical python wand' which will turn you from a bad programmer into a
> good programmer simply by typing 'class Klass(object):