"R.Wieser" writes:
> Richard,
>> 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) :-(
You don’t seem to be paying attention to the answers.
> According to me line "PWMType.tp_new = PyType_GenericNew;" creates a
> single instance,
It doesn’t create an instance of anything. It just sets tp_new to
PyType_GenericNew.
> and than (one of the methods of) that instance is called thru
> accessing the tables "tp_new" field
Instances of the PWM type are created by calling tp_new with &PWMType as
is first argument (plus some other details). In both cases, tp_new is
set to PyType_GenericNew. The number of instances of the PWM type
created is the same as the number of calls.
> 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?).
Neither way of setting tp_new creates anything. They both just set the
value of tp_new to PyType_GenericNew. I have no idea why you think it
does anything else.
> 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.
The number of calls through tp_new is precisely the same as the number
of PWM instances created.
--
https://www.greenend.org.uk/rjk/
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|