Ramashish Baranwal wrote:
> Hi,
>
> I want to use variables passed to a function in an inner defined
> function. Something like-
>
> def fun1(method=None):
> def fun2():
> if not method: method = 'GET'
> print '%s: this is fun2' % method
> return
> fun2()
>
> fun1
On Aug 18, 11:03 pm, Ramashish Baranwal <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I want to use variables passed to a function in an inner defined
> function. Something like-
>
> def fun1(method=None):
> def fun2():
> if not method: method = 'GET'
> print '%s: this is fun2' % method
Ramashish Baranwal <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to use variables passed to a function in an inner defined
> function. Something like-
>
> def fun1(method=None):
> def fun2():
> if not method: method = 'GET'
> print '%s: this is fun2' % method
> return
>
Hi,
I want to use variables passed to a function in an inner defined
function. Something like-
def fun1(method=None):
def fun2():
if not method: method = 'GET'
print '%s: this is fun2' % method
return
fun2()
fun1()
However I get this error-
UnboundLocalError: loc