Eli Bendersky <[email protected]> added the comment:
Boštjan,
"a shallow copy": I took this directly from the documentation of dicts, which
says:
"D.copy() -> a shallow copy of D")
As I mentioned in an earlier message, the doc-strings of list and dict methods
are inconsistent in more than one way, so I'm going to leave this decision to
the committer. I'll be happy to help with fixes too.
Re your other question, in the Python source root, dictionaries are mostly
implemented in Objects/dictobject.c - there's an array called mapp_methods that
lists the functions used to implement relevant methods. For copy() it lists:
{"copy", (PyCFunction)dict_copy, METH_NOARGS,
So you need dict_copy. Note that it's just a wrapper (of another wrapper, by
the way) bit it's a good place to start. Arm yourself with an editor or IDE
with some code-searching capabilities.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10516>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com