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 of

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: >>> class

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 SubClass(BaseCl

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, th

Re: Data Model:

2009-04-13 Thread Anthony
On Apr 13, 1:26 am, Peter Otten <__pete...@web.de> wrote: > Anthony wrote: > > On Apr 12, 7:46 pm, Aaron Watters wrote: > >> On Apr 12, 10:14 pm, Anthony wrote: > > >> > I'm struggling on whether or not to implement GroupItem (below) with > >> > two separate models, or with one model that has a d

Re: Data Model:

2009-04-13 Thread Peter Otten
Anthony wrote: > On Apr 12, 7:46 pm, Aaron Watters wrote: >> On Apr 12, 10:14 pm, Anthony wrote: >> >> >> >> > I'm struggling on whether or not to implement GroupItem (below) with >> > two separate models, or with one model that has a distinguishing key: >> >> > Given: >> > class ParentGroup: >>

Re: Data Model:

2009-04-13 Thread Aaron Brady
On Apr 13, 2:29 am, Anthony wrote: > On Apr 12, 9:36 pm, Aaron Brady wrote: > > > > > On Apr 12, 10:33 pm, Anthony wrote: > > > > On Apr 12, 8:10 pm, Aaron Brady wrote: > > > > > On Apr 12, 9:14 pm, Anthony wrote: > > > > > > I'm struggling on whether or not to implement GroupItem (below) with

Re: Data Model:

2009-04-13 Thread Anthony
On Apr 12, 9:36 pm, Aaron Brady wrote: > On Apr 12, 10:33 pm, Anthony wrote: > > > > > On Apr 12, 8:10 pm, Aaron Brady wrote: > > > > On Apr 12, 9:14 pm, Anthony wrote: > > > > > I'm struggling on whether or not to implement GroupItem (below) with > > > > two separate models, or with one model

Re: Data Model:

2009-04-12 Thread Aaron Brady
On Apr 12, 10:33 pm, Anthony wrote: > On Apr 12, 8:10 pm, Aaron Brady wrote: > > > > > On Apr 12, 9:14 pm, Anthony wrote: > > > > I'm struggling on whether or not to implement GroupItem (below) with > > > two separate models, or with one model that has a distinguishing key: > > > > Given: > > >

Re: Data Model:

2009-04-12 Thread Anthony
On Apr 12, 8:10 pm, Aaron Brady wrote: > On Apr 12, 9:14 pm, Anthony wrote: > > > > > I'm struggling on whether or not to implement GroupItem (below) with > > two separate models, or with one model that has a distinguishing key: > > > Given: > > class ParentGroup: > >     a group of values repres

Re: Data Model:

2009-04-12 Thread Aaron Brady
On Apr 12, 9:14 pm, Anthony wrote: > I'm struggling on whether or not to implement GroupItem (below) with > two separate models, or with one model that has a distinguishing key: > > Given: > class ParentGroup: >     a group of values represented by class GroupItem > > class ChildGroup: >     a gro

Re: Data Model:

2009-04-12 Thread Anthony
On Apr 12, 7:46 pm, Aaron Watters wrote: > On Apr 12, 10:14 pm, Anthony wrote: > > > > > I'm struggling on whether or not to implement GroupItem (below) with > > two separate models, or with one model that has a distinguishing key: > > > Given: > > class ParentGroup: > >     a group of values rep

Re: Data Model:

2009-04-12 Thread Aaron Watters
On Apr 12, 10:14 pm, Anthony wrote: > I'm struggling on whether or not to implement GroupItem (below) with > two separate models, or with one model that has a distinguishing key: > > Given: > class ParentGroup: >     a group of values represented by class GroupItem > > class ChildGroup: >     a gr