Re: Serializing a user-defined class

2010-11-03 Thread Chris Rebert
On Wed, Nov 3, 2010 at 9:48 AM, T.J. Simmons wrote: > And I was about to ask what top-posting was, but then I realized I wasn't > sending this back to the list. So I'm going to assume what that was. Nope, actually it's about placing your reply below the quoted message you're replying to. (See Wi

Re: Serializing a user-defined class

2010-11-03 Thread T.J. Simmons
The way it actually is now, there will be key collision in the dictionaries because each Foo has the same keys. I'm about to dive into the json docs for how it's done on complex, because that seems to be pretty much what I'm looking for. And I was about to ask what top-posting was, but then I real

Re: Serializing a user-defined class

2010-11-03 Thread Chris Rebert
> On Wed, Nov 3, 2010 at 11:18 AM, Chris Rebert wrote: >> > On Wed, Nov 3, 2010 at 10:35 AM, Chris Rebert wrote: >> >> On Wed, Nov 3, 2010 at 8:30 AM, T.J. Simmons >> >> wrote: >> >> > Hi all, got a question regarding serializing classes that I've >> >> > defined. >> >> > I >> >> > have some cla

Re: Serializing a user-defined class

2010-11-03 Thread Chris Rebert
> On Wed, Nov 3, 2010 at 10:35 AM, Chris Rebert wrote: >> On Wed, Nov 3, 2010 at 8:30 AM, T.J. Simmons >> wrote: >> > Hi all, got a question regarding serializing classes that I've defined. >> > I >> > have some classes like >> > class Foo: >> >      def __init__(self, x, y): >> >           self.

Re: Serializing a user-defined class

2010-11-03 Thread John Bond
On 3/11/2010 3:30 PM, T.J. Simmons wrote: Hi all, got a question regarding serializing classes that I've defined. I have some classes like class Foo: def __init__(self, x, y): self.x = x, self.y = y then a class that can contain multiple Foos, such as: class Bar: def __ini

Re: Serializing a user-defined class

2010-11-03 Thread Chris Rebert
On Wed, Nov 3, 2010 at 8:30 AM, T.J. Simmons wrote: > Hi all, got a question regarding serializing classes that I've defined. I > have some classes like > class Foo: >      def __init__(self, x, y): >           self.x = x, self.y = y > then a class that can contain multiple Foos, such as: > class

Serializing a user-defined class

2010-11-03 Thread T.J. Simmons
Hi all, got a question regarding serializing classes that I've defined. I have some classes like class Foo: def __init__(self, x, y): self.x = x, self.y = y then a class that can contain multiple Foos, such as: class Bar: def __init__(self): self.foos = [Foo(a, b),