cause __init__ to return a different class?
Matthew Pounsett
matt.pounsett at gmail.com
Sun Sep 18 16:19:24 EDT 2011
On Sep 15, 1:54 am, Ryan Kelly <r... at rfk.id.au> wrote:
> To be friendlier to others reading your code, I would consider using a
> classmethod to create an alternative constructor:
I finally got back to looking at this today. As it turns out, un-
overriding __new__ in the child class is more complicated than I first
expected, and isn't worth the extra effort. So, I ended up using a
constructor class method as you suggested.
Thanks again!
More information about the Python-list
mailing list