Dennis,
> It does NOT create an instance -- it assigns the /function/
> PyType_GenericNew to the .tp_new "slot"
It /assigns/ a pointer to the function, not calls it ? Oh shucks, its all
about the name /not/ being followed by curly brackets, isn't it ?
> I'll admit I'm perplexed that they didn't just make the assignment in line
> 188.
Yep, that is what my problem started with - I was thinking of doing exactly
that and got a green light for it when mentioning it here, but later on
doubted if it would do the same as the origional and posted that doubt.
> Given that name "type_call", I'm presuming it gets called when a
> Python class is called... eg
> myPWM = RPi.GPIO.PWM(stuff)
I came to the same conclusion, but based on the structures purpose and the
fields name, "tp_new"
> >How many instances do I have now ?
>
> NONE...
Yep, I realized that after Ahems "its a pointer" response.
If only I had thought about that example way earlier. :-)
Regards,
Rudy Wieser
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|