A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-April/099466.html below:

[Python-Dev] Very Strange Argument Handling Behavior

[Python-Dev] Very Strange Argument Handling Behavior [Python-Dev] Very Strange Argument Handling BehaviorRaymond Hettinger raymond.hettinger at gmail.com
Sat Apr 17 00:40:48 CEST 2010
On Apr 16, 2010, at 2:42 PM, Daniel Stutzbach wrote:
> 
> IIRC, there's a performance hack in dictobject.c that keeps track of whether all of the keys are strings or not.  The hack is designed so that lookup operations can call the string compare/hash functions directly if possible, rather than going through the slower PyObject_ functions.
> 
> Consequently, validating **kwds should be cheap.
> 

Good thinking.

That would definitely be better than scanning the full dict on every call.


Raymond


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20100416/18e73ea6/attachment.html>
More information about the Python-Dev mailing list

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