def func2(x): #-если в func2 была передана переменная с именем xoxa, тогда print("xoxa молодец") #-в противном случае print("tato нерд") return "мне повезет" def func1(): xoxa=11 tato=22 x=func2(xoxa) x=func2(tato)
def func2(x): #-если в func2 была передана переменная с именем xoxa, тогда print("xoxa молодец") #-в противном случае print("tato нерд") return "мне повезет" def func1(): xoxa=11 tato=22 x=func2(xoxa) x=func2(tato)
JOHN_16уже посоветовали на тостере
не надо путать имена переменных и их значения.
def f(a): for i in globals(): if a is globals()[i]: print i #break else: print 'no one'
def func1(): xoxa=11 tato=11 x=func2(xoxa) x=func2(tato)
While it is quite possible to emulate the interface of functions in Cython’s own function type, and recent Cython releases have seen several improvements here, the “inspect” module does not consider a Cython implemented function a “function”, because it tests the object type explicitly instead of comparing an abstract interface or an abstract base class. This has a negative impact on code that uses inspect to inspect function objects, but would require a change to Python itself.И так далее и так далее…
doza_andтак еще злее постановка вопроса
А если:

def func1(): xoxa,tato=11 x=func2(xoxa) x=func2(tato)
@func3 def func2(x): . . .