Re: Drilling down in a dict with "complex" objects

2010-05-24 Thread Chris Rebert
On Mon, May 24, 2010 at 9:34 PM, Six wrote: > I am trying to access an objects sub-object attributes. I can boil the > code I am working with down to this problem section: > (snip) > class Pt: >  x = None >  y = None >  def __init__(self, x, y): >    self.x, self.y = x, y >  pass > > class Pts: >

Re: Drilling down in a dict with "complex" objects

2010-05-24 Thread Terry Reedy
On 5/25/2010 12:34 AM, Six wrote: [snip] It's this last line that doesn't work. What am I doing wrong? When posting such questios, print the traceback if there is one or otherwise describe 'does not work' in much more detail. -- http://mail.python.org/mailman/listinfo/python-list

Re: Drilling down in a dict with "complex" objects

2010-05-24 Thread Benjamin Kaplan
On Mon, May 24, 2010 at 9:34 PM, Six wrote: > I am trying to access an objects sub-object attributes. I can boil the > code I am working with down to this problem section: > (snip) > class Pt: >  x = None >  y = None >  def __init__(self, x, y): >    self.x, self.y = x, y >  pass > > class Pts: >

Re: Drilling down in a dict with "complex" objects

2010-05-24 Thread Sean DiZazzo
On May 24, 9:34 pm, Six wrote: > I am trying to access an objects sub-object attributes. I can boil the > code I am working with down to this problem section: > (snip) > class Pt: >   x = None >   y = None >   def __init__(self, x, y): >     self.x, self.y = x, y >   pass > > class Pts: >   curr_p

Drilling down in a dict with "complex" objects

2010-05-24 Thread Six
I am trying to access an objects sub-object attributes. I can boil the code I am working with down to this problem section: (snip) class Pt: x = None y = None def __init__(self, x, y): self.x, self.y = x, y pass class Pts: curr_point = None next_point = None def __init__(self, n,