On Wed, Jan 13, 2010 at 5:21 PM, Hanne Moa <hanne....@gmail.com> wrote:
> 2010/1/13 Tobias McNulty <tob...@caktusgroup.com>:
>> I am by no means an expert on the matter, but I remember seeing a comment
>> awhile back suggesting that it generally makes more sense to fix the 2to3
>> script than to maintain two branches of the same library. Might that be the
>> case here as well?
>
> Py3K does not support old-style classes. Django uses these quite a
> lot, for instance the Meta-class of a model is old-style. I don't
> think it is in any way possible to have an automatic script convert
> these in a sensible way as django is deliberately utilizing the
> difference between old and new style in no doubt a django-specific
> way. If django on 2.x could be rewritten to no longer depend on
> old-style classes, and was made to depend on python 2.6 or newer, then
> 2to3 would have a chance to do its magic.

I can't think of any case where Django *requires* old-style classes.
Old-style classes are certainly used, but that's a combination of
accident, historical implementation and a small dose of clean API
styling ("class Meta" is cleaner and clearer than "class
Meta(object)"). I can't think of any reason why Django's current usage
of old-style classes couldn't be migrated to new-style classes.

Yours,
Russ Magee %-)
-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.


Reply via email to