Re: Data model and attribute resolution in subclasses

2020-03-02 Thread Adam Preble
On Monday, March 2, 2020 at 3:12:33 PM UTC-6, Marco Sulla wrote: > Is your project published somewhere? What changes have you done to the > interpreter? I'm writing my own mess: https://github.com/rockobonaparte/cloaca It's a .NET Pythonish interpreter with the distinction of using a whole lot

Re: Data model and attribute resolution in subclasses

2020-03-02 Thread Adam Preble
On Monday, March 2, 2020 at 7:09:24 AM UTC-6, Lele Gaifax wrote: > Yes, you just used it, although you may have confused its meaning: > Yeah I absolutely got it backwards. That's a fun one I have to fix in my project now! -- https://mail.python.org/mailman/listinfo/python-list

Re: Data model and attribute resolution in subclasses

2020-03-02 Thread Marco Sulla via Python-list
On Fri, 28 Feb 2020 at 08:28, Adam Preble wrote: > > I have been making some progress on my custom interpreter project Is your project published somewhere? What changes have you done to the interpreter? -- https://mail.python.org/mailman/listinfo/python-list

Re: Data model and attribute resolution in subclasses

2020-03-02 Thread Lele Gaifax
Adam Preble writes: > On Sunday, March 1, 2020 at 3:08:29 PM UTC-6, Terry Reedy wrote: > >> Because BaseClass is the superclass of SubClass. > > So there's a mechanism for parent classes to know all their children? Yes, you just used it, although you may have confused its meaning: >>>

Re: Data model and attribute resolution in subclasses

2020-03-01 Thread Adam Preble
On Sunday, March 1, 2020 at 3:08:29 PM UTC-6, Terry Reedy wrote: > Because BaseClass is the superclass of SubClass. So there's a mechanism for parent classes to know all their children? -- https://mail.python.org/mailman/listinfo/python-list

Re: Data model and attribute resolution in subclasses

2020-03-01 Thread Terry Reedy
On 3/1/2020 4:49 AM, Adam Preble wrote: Based on what I was seeing here, I did some experiments to try to understand better what is going on: class BaseClass: def __init__(self): self.a = 1 def base_method(self): return self.a def another_base_method(self):

Re: Data model and attribute resolution in subclasses

2020-03-01 Thread Adam Preble
Based on what I was seeing here, I did some experiments to try to understand better what is going on: class BaseClass: def __init__(self): self.a = 1 def base_method(self): return self.a def another_base_method(self): return self.a + 1 class

Re: Data model and attribute resolution in subclasses

2020-02-28 Thread Terry Reedy
On 2/28/2020 2:21 AM, Adam Preble wrote: I have been making some progress on my custom interpreter project but I found I have totally blown implementing proper subclassing in the data model. What I have right now is PyClass defining what a PyObject is. When I make a PyObject from a PyClass,

Data model and attribute resolution in subclasses

2020-02-27 Thread Adam Preble
I have been making some progress on my custom interpreter project but I found I have totally blown implementing proper subclassing in the data model. What I have right now is PyClass defining what a PyObject is. When I make a PyObject from a PyClass, the PyObject sets up a __dict__ that is used