def test(): def fnc(): print "OK" fnc() test()