[Python-Dev] Re: [ python-Bugs-416670 ] MatchObjects not deepcopy()able

Moshe Zadka moshez@zadka.site.co.il
Fri, 27 Apr 2001 20:50:13 +0300


On Fri, 27 Apr 2001, "Fredrik Lundh" <fredrik@pythonware.com> wrote:

> time to add a __clone__ slot?

It's called __setstate__ and __getstate__, I think?
Don't these have an appropriate C-level slots?

>     # XXX need to support copy_reg here too...

I think it's talking about having copy be the same (but without the
middle man) as Unpickle.loads(Pickle.dumps(o)) (which is a perfect
copy.deepcopy, if a bit wasteful.

-- 
"I'll be ex-DPL soon anyway so I'm        |LUKE: Is Perl better than Python?
looking for someplace else to grab power."|YODA: No...no... no. Quicker,
   -- Wichert Akkerman (on debian-private)|      easier, more seductive.
For public key, finger moshez@debian.org  |http://www.{python,debian,gnu}.org