Re: Need help to understand a getattr syntax.

2009-11-24 Thread Diez B. Roggisch
NMarcu wrote: > Hello all, > I need some help to understand a getattr syntax. The syntax is: > > try: > getattr(self, command)(cursor, row) > except Exception, e: > print "Action failed : '%s'" % command > raise e > > I don't understand why is not like this: a = getattr(), and wh

Need help to understand a getattr syntax.

2009-11-24 Thread NMarcu
Hello all, I need some help to understand a getattr syntax. The syntax is: try: getattr(self, command)(cursor, row) except Exception, e: print "Action failed : '%s'" % command raise e I don't understand why is not like this: a = getattr(), and what are the scope of the second ():