In article mailman.247.1242441988.8015.python-l...@python.org,
Ned Deily n...@acm.org wrote:
In article
fe3354e50905151817ie4df792hebec03ae42eca...@mail.gmail.com,
Sam Tregar s...@tregar.com wrote:
Can anyone explain why this creates a list containing a
dictionary:
[{'a': 'b', 'foo':
In article gun8m0$qt...@panix3.panix.com, a...@pythoncraft.com (Aahz)
wrote:
In article mailman.247.1242441988.8015.python-l...@python.org,
Ned Deily n...@acm.org wrote:
The second example is a call to the built-in function list, [...]
Actually, list() is not a function:
list
type
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
--
In article
fe3354e50905151817ie4df792hebec03ae42eca...@mail.gmail.com,
Sam Tregar s...@tregar.com wrote:
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 })
The first
En Fri, 15 May 2009 22:17:43 -0300, Sam Tregar s...@tregar.com escribió:
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