c[:]()

Warren Stringer warren at muse.com
Wed May 30 14:48:47 EDT 2007


I want to call every object in a tupple, like so:

#------------------------------------------
def a: print 'a'
def b: print 'b'
c = (a,b) 

>>>c[:]()  # i wanna
 TypeError: 'tupple' object is not callable

>>>c[0]()  # expected
a
>>>c[:][0] # huh?
a
>>> [i() for i in c] # too long and ...huh?
a
b
[None,None]
#------------------------------------------

Why? Because I want to make Python calls from a cell phone. 
Every keystroke is precious; even list comprehension is too much. 

Is there something obvious that I'm missing?

Warren

Today's quote: "HELLO PARROT!  wakey wakey!"  




More information about the Python-list mailing list