On Sat, Oct 17, 2009 at 8:24 PM, Jabba Laci <jabba.l...@gmail.com> wrote: > Hi, > > I have some difficulties with list -> tuple conversion: > > t = ('a', 'b') > li = list(t) # tuple -> list, works > print li # ['a', 'b'] > > tu = tuple(li) # list -> tuple, error > print tu # what I'd expect: ('a', 'b') > > The error message is: "TypeError: 'tuple' object is not callable".
You created a variable named "tuple" somewhere, which is shadowing the built-in type. Rename that variable to something else. Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list