Re: How does a method of a subclass become a method of the base class?

2023-03-26 Thread Cameron Simpson
On 27Mar2023 12:03, Cameron Simpson wrote: On 27Mar2023 01:53, Jen Kris wrote: But that brings up a new question.  I can create a class instance with x = BinaryConstraint(), That makes an instance of EqualityConstraint. Copy/paste mistake on my part. This makes an instance of

Re: How does a method of a subclass become a method of the base class?

2023-03-26 Thread Cameron Simpson
On 27Mar2023 01:53, Jen Kris wrote: Thanks for your reply.  You are correct about the class definition lines – e.g. class EqualityConstraint(BinaryConstraint).  I didn’t post all of the code because this program is over 600 lines long.  It's DeltaBlue in the Python benchmark suite. 

Re: How does a method of a subclass become a method of the base class?

2023-03-26 Thread Jen Kris via Python-list
Cameron, Thanks for your reply.  You are correct about the class definition lines – e.g. class EqualityConstraint(BinaryConstraint).  I didn’t post all of the code because this program is over 600 lines long.  It's DeltaBlue in the Python benchmark suite.  I’ve done some more work since

Re: How does a method of a subclass become a method of the base class?

2023-03-26 Thread Cameron Simpson
On 26Mar2023 22:36, Jen Kris wrote: At the final line it calls "satisfy" in the Constraint class, and that line calls choose_method in the BinaryConstraint class.  Just as Peter Holzer said, it requires a call to "satisfy."  My only remaining question is, did it select the choose_method in

Re: How does a method of a subclass become a method of the base class?

2023-03-26 Thread Jen Kris via Python-list
Based on your explanations, I went through the call chain and now I understand better how it works, but I have a follow-up question at the end.    This code comes from the DeltaBlue benchmark in the Python benchmark suite.  1 The call chain starts in a non-class program with the following

[Python-announce] [Release] Pyo 1.0.5 (Python DSP library)

2023-03-26 Thread Olivier Bélanger
Hello all, I'm very happy to announce the release of pyo 1.0.5, available for the following python versions: 3.7 (Windows amd64, MacOS x86_64, linux x86_64) 3.8 (Windows amd64, MacOS x86_64 et arm64, linux x86_64) 3.9 (Windows amd64, MacOS x86_64 et arm64, linux x86_64) 3.10 (Windows amd64,

[Python-announce] Re: [Release] Pyo 1.0.5 (Python DSP library)

2023-03-26 Thread Olivier Bélanger
Sorry, wrong links for the web site and documentation! Official website: https://github.com/belangeo/pyo pyo's documentation: https://belangeo.github.io/pyo/ Latest sources and bug tracker: https://github.com/belangeo/pyo Olivier On Sun, Mar 26, 2023 at 12:25 PM Olivier Bélanger wrote: >

Re: How does a method of a subclass become a method of the base class?

2023-03-26 Thread Jen Kris via Python-list
Thanks to Richard Damon and Peter Holzer for your replies.  I'm working through the call chain to understand better so I can post a followup question if needed.  Thanks again. Jen Mar 26, 2023, 19:21 by rich...@damon-family.org: > On 3/26/23 1:43 PM, Jen Kris via Python-list wrote: > >>

Re: How does a method of a subclass become a method of the base class?

2023-03-26 Thread Richard Damon
On 3/26/23 1:43 PM, Jen Kris via Python-list wrote: The base class: class Constraint(object): def __init__(self, strength):     super(Constraint, self).__init__()     self.strength = strength def satisfy(self, mark):     global planner     self.choose_method(mark) The

Re: How does a method of a subclass become a method of the base class?

2023-03-26 Thread Peter J. Holzer
On 2023-03-26 19:43:44 +0200, Jen Kris via Python-list wrote: > The base class: > > > class Constraint(object): [...] > def satisfy(self, mark): >     global planner >     self.choose_method(mark) > > The subclass: > > class UrnaryConstraint(Constraint): [...] >     def

How does a method of a subclass become a method of the base class?

2023-03-26 Thread Jen Kris via Python-list
The base class: class Constraint(object): def __init__(self, strength):     super(Constraint, self).__init__()     self.strength = strength def satisfy(self, mark):     global planner     self.choose_method(mark) The subclass: class UrnaryConstraint(Constraint): def

Re: Patrick Sheehan: Major Issues with Python

2023-03-26 Thread Thomas Passin
On 3/25/2023 4:03 PM, Patrick Sheehan wrote: Hello, I have been working with the attached book (See photo) Photos do not come through on this list, so don't bother to attach any. Type or copy-paste any useful text. to try to learn Python and so far it has been a complete nightmare trying to

Re: Patrick Sheehan: Major Issues with Python

2023-03-26 Thread MRAB
On 2023-03-25 20:03, Patrick Sheehan wrote: Hello, I have been working with the attached book (See photo) to try to learn Python and so far it has been a complete nightmare trying to get python installed and operating correctly. I have received a plethora of error messages and consulted youtube

Re: Patrick Sheehan: Major Issues with Python

2023-03-26 Thread Mats Wichmann
On 3/25/23 14:03, Patrick Sheehan wrote: Hello, I have been working with the attached book (See photo) to try to learn Python and so far it has been a complete nightmare trying to get python installed and operating correctly. I have received a plethora of error messages and consulted youtube

Patrick Sheehan: Major Issues with Python

2023-03-26 Thread Patrick Sheehan
Hello, I have been working with the attached book (See photo) to try to learn Python and so far it has been a complete nightmare trying to get python installed and operating correctly. I have received a plethora of error messages and consulted youtube videos and chat groups to try to remedy the