"R.Wieser" writes:
> Richard,
>
>> It certainly isn't going to cause the function to be called
>> different numbers of times at some point in the future;
>
> Are you sure ?
>
> 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.
> 2)AFAIK the "tp_new" function is called /every time/ you instanciate
> the PWM class on a selected pin.
Yes. tp_new, and therefore PyType_GenericNew, are called precisely as
many times as you create a PWM instance. No more, no less.
--
https://www.greenend.org.uk/rjk/
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|