Class definition attribute order

Michele Simionato michele.simionato at gmail.com
Sat Aug 9 22:43:02 EDT 2008


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 instinct would be to derive odict from dict (it would obviate
> the conversions in the metaclass). Are you using ABCs just to play
> with all the new toys at the same time? ;-)

If you look at the original Italian version I did derive
from dict originally; however since the ordered dict
implementation I show does not support __delitem__
(on purpose, to make it simple enough to fit in
a short paper) I thought it was more correct
to derive from Mapping, not from dict.

  Michele Simionato



More information about the Python-list mailing list