[Python-bugs-list] [ python-Bugs-416670 ] MatchObjects not deepcopy()able
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 26 Apr 2001 14:50:18 -0700
Bugs item #416670, was updated on 2001-04-17 05:31
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=416670&group_id=5470
Category: Regular Expressions
>Group: Feature Request
Status: Open
Resolution: None
Priority: 5
Submitted By: Henning Thielemann (amigalemming)
Assigned to: Fredrik Lundh (effbot)
Summary: MatchObjects not deepcopy()able
Initial Comment:
In the re-Module which come with Python version 2.0
(Nov 28 11:10 re.py) the created MatchObjects cannot be
copied with a deepcopy(). Switching back to the old
"pre.py" as proposed in "re.py" makes everything work
ok.
----------------------------------------------------------------------
>Comment By: Fredrik Lundh (effbot)
Date: 2001-04-26 14:50
Message:
Logged In: YES
user_id=38376
I'm not sure this is a bug -- imo, you're relying on
an implementation artifact in the original PCRE port.
And making this work under SRE isn't as easy as it may
appear (the proposed patch may work in your specific
case, but it isn't a general solution).
But before I make up my mind here, maybe you could tell
me why you think it's a good idea to use deepcopy on
match objects. Why not just store "m.groups()" or
"m.regs" instead?
Cheers /F
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2001-04-26 01:01
Message:
Logged In: YES
user_id=21627
A patch for that problem is in
http://sourceforge.net/tracker/index.php?func=detail&aid=419070&group_id=5470&atid=305470
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=416670&group_id=5470