On Mon, 2 Dec 2019 13:27:12 +0100, "R.Wieser"
declaimed the following:
>
>Yes, I could just make the changes and do a few tests if the result will
>still work (I have the feeling it will), but I can't test everything and
>perhaps there are some design/readability considerations involved too. Hence
>the post. :-)
>
I'm not going to crawl through the code and Python embedding/extension
manuals... But I will comment that, in Python, instantiating a class object
invokes two functions
__new__()
__init__()
The first is responsible for allocating the space for the object (and
possibly setting up special conditions), the second is responsible for
initializing the allocated object.
My suspicion is that the two functions you mention are C-level
equivalents of new and init (though with confusing names). The
"if(...NULL)" confirms that the object space was created, then the
initialization takes place.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|