Re: class C: vs class C(object):

2007-07-26 Thread Bruno Desthuilliers
Aahz a écrit : (snip) > Enh. *All* of the standard Python documentation currently starts with > teaching classic classes, (snip) > There is almost no basic documentation > that starts with new-style classes; (snip) Just for the record: http://docs.python.org/ref/node33.html http://www.python.org

Re: class C: vs class C(object):

2007-07-25 Thread Bruno Desthuilliers
Aahz a écrit : (snip) > *YOU* are the one confusing people by your dogmatic insistance that > classic classes should be ignored. Grow up. I did. I still do. With every new Python release. I'm sorry for you that you are still stuck with almost prehistoric Python versions, but I don't accept th

Re: class C: vs class C(object):

2007-07-23 Thread Klaas
On Jul 20, 5:47 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > In particular, old-style classes are noticeably faster than > > new-style classes for some things (I think it was attribute lookup > > that surprised me recently, possibly related to t

Re: class C: vs class C(object):

2007-07-21 Thread Bruno Desthuilliers
George Sakkis a écrit : > On Jul 20, 5:40 am, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: > >>Aahz a écrit : >> >> >>>In article <[EMAIL PROTECTED]>, >>>Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >>> To make a long story short: Python 2.2 introduced a new object model which is more

Re: class C: vs class C(object):

2007-07-21 Thread Aahz
In article <[EMAIL PROTECTED]>, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >Aahz a écrit : >> In article <[EMAIL PROTECTED]>, >> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >>> >>> To make a long story short: Python 2.2 introduced a new object model >>> which is more coherent and more pow

Re: class C: vs class C(object):

2007-07-20 Thread George Sakkis
On Jul 20, 5:40 am, Bruno Desthuilliers wrote: > Aahz a écrit : > > > In article <[EMAIL PROTECTED]>, > > Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > >> To make a long story short: Python 2.2 introduced a new object model > >> which is more coherent and more powerful than the original one. T

Re: class C: vs class C(object):

2007-07-20 Thread Steven D'Aprano
On Thu, 19 Jul 2007 10:42:54 -0700, Aahz wrote: > In article <[EMAIL PROTECTED]>, > Steven D'Aprano <[EMAIL PROTECTED]> wrote: >> >>It isn't wrong to use the old style, but it is deprecated, [...] > > Really? Can you point to some official documentation for this? AFAIK, > new-style classes sti

Re: class C: vs class C(object):

2007-07-20 Thread Hrvoje Niksic
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > In particular, old-style classes are noticeably faster than > new-style classes for some things (I think it was attribute lookup > that surprised me recently, possibly related to the property > stuff...) Can you post an example that we can benchma

Re: class C: vs class C(object):

2007-07-20 Thread Bruno Desthuilliers
Aahz a écrit : > In article <[EMAIL PROTECTED]>, > Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >> To make a long story short: Python 2.2 introduced a new object model >> which is more coherent and more powerful than the original one. The old >> one was kept so far for compatibility reasons, b

Re: class C: vs class C(object):

2007-07-20 Thread [EMAIL PROTECTED]
Aahz wrote: > In article <[EMAIL PROTECTED]>, > James Stroud <[EMAIL PROTECTED]> wrote: > >Aahz wrote: > >> In article <[EMAIL PROTECTED]>, > >> Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >>> > >>>It isn't wrong to use the old style, but it is deprecated, [...] > >> > >> > >> Really? Can you p

Re: class C: vs class C(object):

2007-07-19 Thread Matt McCredie
>How about "broke" instead of "deprecated": > > > >>> class Old: >... def __init__(self): >... self._value = 'broke' >... value = property(lambda self: self._value) >... How is this broken? Properties are not supported for old-style classes. They may not support features introduced in n

Re: class C: vs class C(object):

2007-07-19 Thread Aahz
In article <[EMAIL PROTECTED]>, James Stroud <[EMAIL PROTECTED]> wrote: >Aahz wrote: >> In article <[EMAIL PROTECTED]>, >> Steven D'Aprano <[EMAIL PROTECTED]> wrote: >>> >>>It isn't wrong to use the old style, but it is deprecated, [...] >> >> >> Really? Can you point to some official documen

Re: class C: vs class C(object):

2007-07-19 Thread James Stroud
Aahz wrote: > In article <[EMAIL PROTECTED]>, > Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >>It isn't wrong to use the old style, but it is deprecated, [...] > > > Really? Can you point to some official documentation for this? AFAIK, > new-style classes still have not been integrated into t

Re: class C: vs class C(object):

2007-07-19 Thread Aahz
In article <[EMAIL PROTECTED]>, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >It isn't wrong to use the old style, but it is deprecated, [...] Really? Can you point to some official documentation for this? AFAIK, new-style classes still have not been integrated into the standard documentation.

Re: class C: vs class C(object):

2007-07-19 Thread Aahz
In article <[EMAIL PROTECTED]>, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > >To make a long story short: Python 2.2 introduced a new object model >which is more coherent and more powerful than the original one. The old >one was kept so far for compatibility reasons, but there's absolutely n

Re: class C: vs class C(object):

2007-07-19 Thread Steven D'Aprano
On Thu, 19 Jul 2007 07:31:06 +, nvictor wrote: > Hi, > > I'm not an experienced developer, and I came across this statement by > reading a code. I search for explanation, but can't find anything > meaningful. I read the entire document written by python's creator > about the features of versi

Re: class C: vs class C(object):

2007-07-19 Thread Lutz Horn
Hi, On Thu, 19 Jul 2007 09:40:24 +0200, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > there's absolutely no reason to use it no more since "new-style" classes > can do anything "Classic" classes did and much more. IOW, don't even > bother with old-style classes. Just for the records: the

Re: class C: vs class C(object):

2007-07-19 Thread Bruno Desthuilliers
nvictor a écrit : > Hi, > > I'm not an experienced developer, and I came across this statement by > reading a code. I search for explanation, but can't find anything > meaningful. I read the entire document written by python's creator > about the features of version 2.2 The one named unifying type

class C: vs class C(object):

2007-07-19 Thread nvictor
Hi, I'm not an experienced developer, and I came across this statement by reading a code. I search for explanation, but can't find anything meaningful. I read the entire document written by python's creator about the features of version 2.2 The one named unifying types and classes. But This docume