> Is there a reason that dict.copy() runs like an update()? > It creates a new dict object, then re-hashes and inserts > every element one-by-one, complete with collisions. > > I would have expected a single pass to update refcounts, > an allocation for identical size, and a memcpy to polish > it off. After you've inserted and removed many elements into a dict, the elements may not be in the best order, and there may be many "deleted" markers. The update() strategy avoids copying such cruft. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4