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/099474.html below:

[Python-Dev] Very Strange Argument Handling Behavior

[Python-Dev] Very Strange Argument Handling Behavior [Python-Dev] Very Strange Argument Handling BehaviorMichael Foord fuzzyman at voidspace.org.uk
Sat Apr 17 02:53:58 CEST 2010
On 17/04/2010 02:43, Greg Ewing wrote:
> Daniel Stutzbach wrote:
>
>> Unless you're saying you often create a dictionary, add non-string 
>> keys, remove the non-string keys, then pass it as a **kwds? ;-)
>
> I think the point is that it would create a very mysterious
> potential failure mode. What would you make of a situation
> where Python says "TypeError: Keyword dict contains non-string
> keys", but upon examination, the dict clearly does not contain
> any such thing?
>
No, if the dictionary is not marked as an all-string dict it can 
fallback to checking. The common case (dict marked as all strings) is fast.

Michael

-- 
http://www.ironpythoninaction.com/

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