Re: Class definition attribute order

2008-08-15 Thread Benjamin
On Aug 5, 12:53 am, Michele Simionato <[EMAIL PROTECTED]> wrote: > BTW, since I do not really follow python-dev, do you know > if some consensus was reached on the issue of adding an ordered dict > implementation to the standard library? I believe it has been deferred to 2.7/3.1. -- http://mail.p

Re: Class definition attribute order

2008-08-09 Thread Michele Simionato
On Aug 10, 12:14 am, thebjorn > > FWIW, I have just finished translating the first > > part of the article and I have posted it on my > > blog on Artima: > > >http://www.artima.com/weblogs/viewpost.jsp?thread=236234 > > Great feature and great article!  I haven't used ABCs yet, so my > initial inst

Re: Class definition attribute order

2008-08-09 Thread thebjorn
On Aug 9, 7:55 am, Michele Simionato <[EMAIL PROTECTED]> wrote: > On Aug 5, 5:05 am, Michele Simionato > > > Yep. Seehttp://stacktrace.it/articoli/2008/01/metaclassi-python-3000 > > (I am working on an English translation these days, > > but for the moment you can use Google Translator). > > >  M.

Re: Class definition attribute order

2008-08-09 Thread Michele Simionato
On Aug 5, 5:05 am, Michele Simionato > Yep. Seehttp://stacktrace.it/articoli/2008/01/metaclassi-python-3000 > (I am working on an English translation these days, > but for the moment you can use Google Translator). > >  M. Simionato FWIW, I have just finished translating the first part of the arti

Re: Class definition attribute order

2008-08-05 Thread Terry Reedy
Michele Simionato wrote: BTW, since I do not really follow python-dev, do you know if some consensus was reached on the issue of adding an ordered dict implementation to the standard library? I thought there was to be one added to collections, where default_dict lives, but I do not remember

Re: Class definition attribute order

2008-08-04 Thread Gabriel Genellina
En Tue, 05 Aug 2008 00:05:58 -0300, Michele Simionato <[EMAIL PROTECTED]> escribió: On Aug 5, 4:38 am, "Gabriel Genellina": So the namespace that the metaclass receives when the class is created, will be some kind of ordered dictionary? Metaclasses are available for a long time ago, but th

Re: Class definition attribute order

2008-08-04 Thread Michele Simionato
On Aug 5, 7:47 am, Terry Reedy <[EMAIL PROTECTED]> wrote: > > Bfiefly, as I understood the discussion some months ago: In 2.x, the > class body is executed in a local namespace implemented as a normal dict > and *then* passed to the metaclass.  In 3.0, the metaclass gets brief > control *before* ex

Re: Class definition attribute order

2008-08-04 Thread Terry Reedy
Michele Simionato wrote: On Aug 5, 4:38 am, "Gabriel Genellina": So the namespace that the metaclass receives when the class is created, will be some kind of ordered dictionary? Metaclasses are available for a long time ago, but the definition order is lost right at the start, when the clas

Re: Class definition attribute order

2008-08-04 Thread Michele Simionato
On Aug 5, 4:38 am, "Gabriel Genellina": > > So the namespace that the metaclass receives when the class is created,   > will be some kind of ordered dictionary? > Metaclasses are available for a long time ago, but the definition order is   > lost right at the start, when the class body is executed.

Re: Class definition attribute order

2008-08-04 Thread Gabriel Genellina
En Fri, 01 Aug 2008 23:47:42 -0300, Benjamin <[EMAIL PROTECTED]> escribió: On Aug 1, 6:23 pm, Andrew Lentvorski <[EMAIL PROTECTED]> wrote: How do I determine the order of definition of class attributes? For example, if I have a class class Test(object):      y = 11      x = 22 How do I tell

Re: Class definition attribute order

2008-08-01 Thread Benjamin
On Aug 1, 6:23 pm, Andrew Lentvorski <[EMAIL PROTECTED]> wrote: > How do I determine the order of definition of class attributes? > > For example, if I have a class > > class Test(object): >      y = 11 >      x = 22 > > How do I tell that y was defined before x? You wait until Python 3.0 where yo

Re: Class definition attribute order

2008-08-01 Thread Ben Finney
Andrew Lentvorski <[EMAIL PROTECTED]> writes: > How do I determine the order of definition of class attributes? > > For example, if I have a class > > class Test(object): > y = 11 > x = 22 > > How do I tell that y was defined before x? Like any namespace, attributes of an object are im

Re: Class definition attribute order

2008-08-01 Thread Miles
On Fri, Aug 1, 2008 at 7:23 PM, Andrew Lentvorski <[EMAIL PROTECTED]> wrote: > How do I determine the order of definition of class attributes? > > For example, if I have a class > > class Test(object): >y = 11 >x = 22 > > How do I tell that y was defined before x? You can't. The order tha

Class definition attribute order

2008-08-01 Thread Andrew Lentvorski
How do I determine the order of definition of class attributes? For example, if I have a class class Test(object): y = 11 x = 22 How do I tell that y was defined before x? Thanks, -a -- http://mail.python.org/mailman/listinfo/python-list