TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: R.WIESER
from: RICHARD KETTLEWELL
date: 2019-12-04 16:56:00
subject: Re: RPi.GPIO-0.7.0 - a fe

"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)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.