On Wed, Aug 1, 2012 at 11:10 AM, Hugo Arts <hugo.yo...@gmail.com> wrote:
> On Wed, Aug 1, 2012 at 4:28 PM, rail shafigulin <rail.shafigu...@gmail.com>
>
> * small caveat: I'm entirely unsure of this, but I *think* if you create
> CarModel with a metaclass that overrides __call__ you can change the way
> __new__ and __init__ work? If anyone can confirm this, be my guest.
>

That works, but if you're going to use a metaclass (i.e. a type
subclass of which the CarModel class is an instance), you may as well
skip overriding __new__. You don't want to mess around with
metaclasses, however, unless absolutely necessary. Don't needlessly
complicate your code to make it harder to understand and maintain.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to