Custom class to a dictionary?

Oliver Beattie oliver at obeattie.com
Sat Jan 26 06:35:18 EST 2008


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



More information about the Python-list mailing list