On Thu, Dec 27, 2012 at 6:46 PM, Abhas Bhattacharya <abhasbhattachar...@gmail.com> wrote: > [ a whole lot of double-spaced quoted text - please trim it ] > If i call one() and two() respectively, i would like to see "one" and "two".
That completely goes against your idea of knowing at compile-time, because the name "two" isn't anywhere around at that time. There's no way to know what name was used to look something up. It might not even have a name - the called function could well have been returned from another function: # foo.py def indirection(): return lambda: print # bar.py import foo foo.indirection()()("Hello, world!") What are the names of all the functions called here? ChrisA -- http://mail.python.org/mailman/listinfo/python-list