A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-October/083181.html below:

[Python-Dev] Proper initialization of structs

[Python-Dev] Proper initialization of structs [Python-Dev] Proper initialization of structsFred Drake fdrake at acm.org
Thu Oct 30 18:00:35 CET 2008
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>

More information about the Python-Dev mailing list

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