summaryrefslogtreecommitdiffstats
path: root/Lib/copy.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix for SF bug ##497426: can't deepcopy recursive new objectsGuido van Rossum2001-12-281-4/+6
| | | | | | | | deepcopy(), _reconstruct(): pass the memo to the other function, so that recursive data structures built out of new-style objects may be deeply copied correctly. 2.2.1 bugfix!
* Add complex to the dispatch tables, to avoid going through the wholeGuido van Rossum2001-09-281-0/+8
| | | | rigmarole of __reduce__.
* Changes to copy() and deepcopy() in copy.py to support __reduce__ as aGuido van Rossum2001-09-281-7/+39
| | | | | | | | | | fallback for objects that are neither supported by our dispatch table nor have a __copy__ or __deepcopy__ method. Changes to _reduce() in copy_reg.py to support reducing objects that don't have a __dict__ -- copy.copy(complex()) now invokes _reduce(). Add tests for copy.copy() and copy.deepcopy() to test_regrtest.py.
* Patch #445762: Support --disable-unicodeMartin v. Löwis2001-08-171-2/+8
| | | | | | | | - Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled - check for Py_USING_UNICODE in all places that use Unicode functions - disables unicode literals, and the builtin functions - add the types.StringTypes list - remove Unicode literals from most tests.
* added __all__ lists to a number of Python modulesSkip Montanaro2001-01-201-0/+2
| | | | | | | | added test script and expected output file as well this closes patch 103297. __all__ attributes will be added to other modules without first submitting a patch, just adding the necessary line to the test script to verify more-or-less correct implementation.
* Whitespace normalization.Tim Peters2001-01-141-183/+183
|
* Patch by Finn Bock to support PyStringMap in Jython.Guido van Rossum2000-11-271-0/+9
|
* Added Unicode objects to the copy mechanism. Since these are immutable,Marc-André Lemburg2000-09-071-0/+2
| | | | they are copied as atomic types.
* Convert some old-style string exceptions to class exceptions.Fred Drake2000-08-171-2/+3
|
* Actually, the previous batch's comment should have been different;Guido van Rossum2000-02-041-3/+1
| | | | | | | | | | *this* set of patches is Ka-Ping's final sweep: The attached patches update the standard library so that all modules have docstrings beginning with one-line summaries. A new docstring was added to formatter. The docstring for os.py was updated to mention nt, os2, ce in addition to posix, dos, mac.
* Don't die if CodeType doesn't exist -- ignore the error. This couldGuido van Rossum1999-01-251-1/+4
| | | | happen in restricted mode.
* A few lines were indented using spaces instead of tabs -- fix them.Guido van Rossum1998-03-261-14/+14
|
* As Mike Fletcher pointed out, a __deepcopy__() method should be calledGuido van Rossum1998-03-131-1/+1
| | | | with the memo as an argument.
* Apply the same change to classes without an __getinitargs__() methodGuido van Rossum1997-12-071-5/+11
| | | | as in pickle: the new instance is created without calling __init__().
* Use __dict__.update(state) instead of for loop over state.items() andGuido van Rossum1997-10-261-11/+9
| | | | | | | call to setattr(). This changes semantics, following the change already implemented in pickle. Also reindented a few lines properly.
* Add XXX note about wanting support for copy_reg.py...Guido van Rossum1997-10-071-0/+2
|
* Make sure the objects returned by __getinitargs__() are kept alive (inGuido van Rossum1997-08-201-0/+18
| | | | | | the memo) to avoid a certain kind of nasty crash. (Not easily reproducable because it requires a later call to __getinitargs__() to return a tuple that happens to be allocated at the same address.)
* Remove '(' in column 0 of doc strings.Guido van Rossum1997-05-281-10/+12
| | | | Add dependency on dict.copy().
* Memoize _deepcopy_tuple() -- maybe this helps Tommy's problem.Guido van Rossum1996-06-171-2/+6
|
* fix bogus hasttr usageGuido van Rossum1995-03-221-2/+2
|
* rename copy.Error to copy.errorGuido van Rossum1995-03-141-5/+8
|
* added __doc__ strings etc.Guido van Rossum1995-02-091-34/+64
|
* shallow and deep copy operationsGuido van Rossum1995-01-101-0/+240