Why aren't copy and deepcopy in __builtins__?

Raymond Hettinger python at rcn.com
Wed Mar 30 20:35:59 EDT 2011


On Mar 27, 8:29 pm, John Ladasky <lada... at my-deja.com> wrote:
> Simple question.  I use these functions much more frequently than many
> others which are included in __builtins__.  I don't know if my
> programming needs are atypical, but my experience has led me to wonder
> why I have to import these functions.

I asked Guido about this once and he said that he didn't
consider them to be part of the core.  He worried that
they would be overused by beginners and they would be
a distraction from learning plain, simple Python which
doesn't often need either copy() or deepcopy().

AFAICT, he was right.  I've seen large projects where
deepcopy and copy where not used even once.

Raymond



More information about the Python-list mailing list