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

Fredrik Lundh fredrik@effbot.org
Thu, 26 Apr 2001 22:50:38 +0200


Martin v. Loewis wrote:
> What's wrong with patch #419070, which fixes the bug? Like any other
> immutable object, deepcopying a match object means returning it.

what makes you think a match object is immutable?

import array, sre

a = array.array("c", "abcde")
m = sre.search("bcd", a)
print m.group(0)

Cheers /F