On Thu, Mar 6, 2014 at 9:00 AM, Jignesh Sutar <jsu...@gmail.com> wrote: > Hi I'm trying to exclude a certain line of code if the function is called by > another function, see illustration below: > > > def funcA(): > print "running from funcA" # print only if running from funcA > print "running from funcA or funcB" #print when running from either > function > print "running from funcB" # print only when running from funcB > > def funcB(): > funcA() > > funcB()
Can you directly pass the state that funcA cares about as an explicit parameter? I think we need to understand what you're trying to do in context. Tell us more why you want to do what you're doing. Maybe the approach you're taking is correct, or maybe there's an easier way to accomplish what you're trying to do. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor