On Oct 30, 2008, at 10:20 AM, Christian Heimes wrote:
I like to establish a rule that *all* struct members must be initialized properly in the type's tp_new function.
I think this has always been a requirement. The result of the "new" operation must conform to all the requirements that the type's C code demands.
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.
-Fred -- Fred Drake <fdrake at acm.org> _______________________________________________ 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