On Thu, Oct 30, 2008 at 6:36 PM, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Alexandre Vassalotti wrote: >> 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__. > > No it doesn't - it just means the subclasses have to override __new__ as > well and then give the parent class the arguments it needs. >
Right, and that's what subclasses of built-in types need to do. However for _pickle, I wanted to reduce interface differences between the Python implementation. Perhaps, in that case, moving the content of __init__ methods in both implementations would have been a better choice. That would certainly make it easier to expose internal methods easier to fix issue3385. Is it too late to change? -- Alexandre _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com