Gary Herron <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]:
> The problem is that list methods like insert do not return a list -- > they modify it in place. If you do > a = [1,2,3] > a.insert(0, 'something') > then a will have the results you expect, but if you do > b = a.insert(0,'something') > you will find b to be None (although a will have the expected list). I figured that out few minutes ago, such a newbie mistake :). The fix I came up with is: result = ['something'] + [someMethod(i) for i in some_list] Are there any other alternatives to this approach? -- _______ Karlo Lozovina - Mosor | | |.-----.-----. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum. |__|_|__||_____|_____| -- http://mail.python.org/mailman/listinfo/python-list
