[Python-Dev] metaclass insanity

Patrick K. O'Brien pobrien@orbtech.com
Mon, 4 Nov 2002 12:36:59 -0600


On Monday 04 November 2002 11:10 am, Michael Hudson wrote:
>
> What happens for nested classes?
>
> In
>
> class X:
>     class Y:
>         pass
>
> are X.Y instances picklable without extra fiddling?

Picklable functions and classes must be defined in the top level of a 
module. Nested classes, and instances thereof, cannot be pickled at all.

-- 
Patrick K. O'Brien
Orbtech      http://www.orbtech.com/web/pobrien
-----------------------------------------------
"Your source for Python programming expertise."
-----------------------------------------------