Serhiy Storchaka added the comment: Since the pattern and the match objects can be considered as immutable, it is worth to implement __copy__ and __deepcopy__ returning the object itself. Proposed PR does this. It also fixes signatures of __deepcopy__ methods.
Since copying didn't work in all maintained version for long time, this is rather a new feature than a bug fix. ---------- nosy: +serhiy.storchaka type: behavior -> enhancement versions: +Python 3.7 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10076> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com