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/

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to