On Thu, Oct 30, 2008 at 1:00 PM, Fred Drake <fdrake at acm.org> wrote: > It's good to move work into __init__ where reasonable, so that it can be > avoided if a subclass wants it done in a completely different way, but new > can't work that way. > And that is exactly the reason why, the _pickle module doesn't use __new__ for initialization. Doing any kind of argument parsing in __new__ prevents subclasses from customizing the arguments for their __init__. Although, I agree that __new__ should be used, whenever it is possible, to initialize struct members. -- Alexandre
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4