[Tutor] Using type

2011-08-11 Thread Emeka
Hello All, I need help here, type(item) == [].__class__:. What is the idiomatic way of doing it? def myflatten(my_data): gut = [] for item in my_data: if type(item) == [].__class__: gut = gut + myflatten ( item) else: gut.append(item) return gut print myfl

Re: [Tutor] Something in my .pythonrc broke my shell

2011-08-11 Thread Tino Dai
On Thu, Aug 11, 2011 at 6:44 AM, Wolf Halton wrote: > Tino, > Copy the contents of your .pythonrc here so we can see what is going on. > Wolf > > I pastebin'ed it: http://pastebin.com/tdsK9JtK -Thanks, Tino ___ Tutor maillist - Tutor@python.org To un

[Tutor] Something in my .pythonrc broke my shell

2011-08-11 Thread Tino Dai
Hi Everybody, I'm using sontak's environment to give me a IDE in vim. He also crafted some code in the .pythonrc. Problem is, it broken my keyboard. The letter b not longer displays when I'm in the python shell (2.6.5 - linux), but everything is fine when enter the shell using the -E flag.