From e348c6d1a7982bd42fe427d490ddc2b5ed378ff8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 14 Jun 2003 07:20:04 +0000 Subject: [PATCH] copy and deepcopy builtin functions atomically. Fixes #746304. Also backport 2.36 (deepcopy classes atomically). --- Lib/copy.py | 3 +++ Misc/NEWS | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/Lib/copy.py b/Lib/copy.py index eae3b6f6a673..9782c6b56593 100644 --- a/Lib/copy.py +++ b/Lib/copy.py @@ -112,6 +112,7 @@ except AttributeError: d[types.TypeType] = _copy_atomic d[types.XRangeType] = _copy_atomic d[types.ClassType] = _copy_atomic +d[types.BuiltinFunctionType] = _copy_atomic def _copy_list(x): return x[:] @@ -211,6 +212,8 @@ except AttributeError: pass d[types.TypeType] = _deepcopy_atomic d[types.XRangeType] = _deepcopy_atomic +d[types.ClassType] = _deepcopy_atomic +d[types.BuiltinFunctionType] = _deepcopy_atomic def _deepcopy_list(x, memo): y = [] diff --git a/Misc/NEWS b/Misc/NEWS index ec4a61115027..eb746f32f7fe 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -1,3 +1,8 @@ +What's New in Python 2.2.4? + +- SF #746304: Builtin functions are now copy.[deep]copyable. + Classes are now also deepcopyable. + What's New in Python 2.2.3 (final) ? Release date: 30-May-2003 ==================================== -- 2.47.3