Comment 12 for bug 602825

Revision history for this message
Adam Blackburn (adamblackburn) wrote :

Any idea why this would have shown up in Python 2.7?

In Python 2.6.5:
>>> copy.deepcopy(re.compile(r'\w+'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/copy.py", line 173, in deepcopy
    y = copier(memo)
TypeError: cannot deepcopy this pattern object

Why does this only show up with Python 2.7 if 2.6 cannot copy regular expressions either?