Richard,
>> 1) The "PWMType.tp_new = PyType_GenericNew;" inside the
>> "PWM_init_PWMType" function is called exactly /once/ when the GPIO
>> module is loaded..
>
> No function is called in that line.
Re-read please. I did not say it was a function that got called, I said
that its called INSIDE a function - which name I only mentioned so you could
easily find it back.
> Yes. tp_new, and therefore PyType_GenericNew, are called precisely
> as many times as you create a PWM instance. No more, no less.
Am I speaking some foreign language perhaps ? I really thought that my
English/American wasn't /that/ bad. 'Cause no matter how I say it you do
not seem to understand what I'm trying to explain (you just repeat the same
phrase over-and-over again) :-(
According to me line "PWMType.tp_new = PyType_GenericNew;" creates a single
instance, and than (one of the methods of) that instance is called thru
accessing the tables "tp_new" field
But if-and-when you put the "PyType_GenericNew" into the table itself you
will, as far as I can tell, create a new instance every time (yes ? no?).
Thats a BIG difference. Care to explain how that /doesn't/ happen ?
In short, the ammount of calls does not interest me in the slightest. What
/does/ is the AMMOUNT OF INSTANCES that either of the described methods will
result in, preferrably accompanied by some explanation pointing out where my
train of thoughts goes amiss.
Regards,
Rudy Wieser.
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|