Re: Need help initializing a list or tuple.

2006-03-06 Thread cdunn2001
# Nested list comprehensions act like real for loops:
>>> a = [[None for i in range(3)] for j in range(3)]
>>> a
[[None, None, None], [None, None, None], [None, None, None]]
>>> a[0][0] = 5
>>> a
[[5, None, None], [None, None, None], [None, None, None]]
# Side-effect: i and j will be changed.

# Another way (much less clear to my eyes):
>>> a = map(lambda x: map(lambda x: None, range(3)), range(3))
>>> a[0][0]=5
>>> a
[[5, None, None], [None, None, None], [None, None, None]]

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: IronPython on Shootout

2006-03-06 Thread cdunn2001
On Mono, it makes more sense to add Boo. I've been looking for Boo
benchmarks.

-- 
http://mail.python.org/mailman/listinfo/python-list