Karim wrote:

Hello all,


I have :

    def foo():
           print( getattr(foo, 'func_name'))

Why not this?

def foo():
    print 'foo'


You already know the name of the function.

There is no portable way of retrieving the name of the current function from within that function.



--
Steven

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to