FAQ
Hello all. Can anyone explain why this creates a list containing a
dictionary:

[{'a': 'b', 'foo': 'bar'}]

But this creates a list of keys of the dictionary:

list({ "a": "b", "foo": "bar" })

I expected them to be equivalent but clearly they're not! I'm using Python
2.6.1 if that helps.

-sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090515/82dd327e/attachment.htm>

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 5 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedMay 16, '09 at 1:17a
activeMay 16, '09 at 9:32p
posts5
users4
websitepython.org

People

Translate

site design / logo © 2018 Grokbase