Author eli.bendersky
Recipients Retro, eli.bendersky, eric.araujo, eric.smith, georg.brandl, giampaolo.rodola, rhettinger, terry.reedy, xuanji
Date 2010-12-06.04:30:19
SpamBayes Score 2.24083e-08
Marked as misclassified No
Message-id <1291609821.56.0.67586942078.issue10516@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-12-06 04:30:21eli.benderskysetrecipients: + eli.bendersky, georg.brandl, rhettinger, terry.reedy, eric.smith, giampaolo.rodola, eric.araujo, Retro, xuanji
2010-12-06 04:30:21eli.benderskysetmessageid: <1291609821.56.0.67586942078.issue10516@psf.upfronthosting.co.za>
2010-12-06 04:30:19eli.benderskylinkissue10516 messages
2010-12-06 04:30:19eli.benderskycreate