Re: Custom class to a dictionary?

2008-01-26 Thread Oliver Beattie
On Jan 26, 12:01 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 26 Jan 2008 03:35:18 -0800, Oliver Beattie wrote: > > Just wondering if it is possible to pass a custom class instance > > instance to dict() by way of using methods like you can for iterators > > (__iter__

Re: Custom class to a dictionary?

2008-01-26 Thread Steven D'Aprano
On Sat, 26 Jan 2008 03:35:18 -0800, Oliver Beattie wrote: > Just wondering if it is possible to pass a custom class instance > instance to dict() by way of using methods like you can for iterators > (__iter__, __getitem__ etc.) I see there is no __dict__ -- is there > anything else I can use to ac

Custom class to a dictionary?

2008-01-26 Thread Oliver Beattie
Just wondering if it is possible to pass a custom class instance instance to dict() by way of using methods like you can for iterators (__iter__, __getitem__ etc.) I see there is no __dict__ -- is there anything else I can use to achieve this? Kind Regards, Oliver -- http://mail.python.org/mailma