[Chicago] create all classes

Kumar McMillan kumar.mcmillan at gmail.com
Fri Feb 1 20:14:29 CET 2008


On Feb 1, 2008 12:35 PM, Lukasz Szybalski <szybalski at gmail.com> wrote:
> What is the difference between:
>
> class A:
>     def __init__(self):
> ....
> type <type 'classobj'>
>
> class B(object):
>     def __init__(self):
> ....
> type: <type 'type'>
>
>
> Shouldn't both be classobj?

in python 3 they will both be <type 'type'> iirc.  In 2.4 and 2.5 you
get the <type 'classobj'> if you don't inherit from object for legacy
support; more info:

http://docs.python.org/ref/node33.html


> Since they are not how can I tell this is a class I am after? What
> would happen if I had a mix of both class A, class B(object)......?
>
>
> Lucas
> --
> Copy paste python code
> http://lucasmanual.com/mywiki/PythonManual
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
>


More information about the Chicago mailing list