On Sat, Apr 24, 2010, Yingjie Lan lany...@yahoo.com wrote:
On Sun, 4/25/10, Chris Rebert c...@rebertia.com wrote:
On Sat, Apr 24, 2010, Yingjie Lan lany...@yahoo.com wrote:
On Sat, 4/24/10, Gary Herron gher...@islandtraining.com wrote:
Yingjie Lan wrote:
On Sat, 4/24/10, Steven D'Aprano
--- On Sun, 4/25/10, Chris Rebert c...@rebertia.com wrote:
From: Chris Rebert c...@rebertia.com
Subject: Re: NameError: how to get the name?
To: Yingjie Lan lany...@yahoo.com
Cc: python list python-list@python.org
Date: Sunday, April 25, 2010, 10:09 AM
On Sat, Apr 24, 2010, Yingjie Lan
I wanted to do something like this:
while True:
try:
def fun(a, b=b, c=c): pass
except NameError as ne:
name = get_the_var_name(ne)
locals()[name] = ''
else: break
What's be best way to implement the function
get_the_var_name(ne) that returns the name
of the variable that
On Sat, Apr 24, 2010 at 9:19 PM, Yingjie Lan lany...@yahoo.com wrote:
I wanted to do something like this:
while True:
try:
def fun(a, b=b, c=c): pass
except NameError as ne:
name = get_the_var_name(ne)
locals()[name] = ''
else: break
What's be best way to implement the
On Sat, 24 Apr 2010 04:19:43 -0700, Yingjie Lan wrote:
I wanted to do something like this:
while True:
try:
def fun(a, b=b, c=c): pass
except NameError as ne:
name = get_the_var_name(ne)
locals()[name] = ''
else: break
This won't work. Writing to locals() does not
--- On Sat, 4/24/10, Steven D'Aprano st...@remove-this-cybersource.com.au
wrote:
From: Steven D'Aprano st...@remove-this-cybersource.com.au
Subject: Re: NameError: how to get the name?
To: python-list@python.org
Date: Saturday, April 24, 2010, 4:07 PM
On Sat, 24 Apr 2010 04:19:43 -0700
--- On Sat, 4/24/10, James Mills prolo...@shortcircuit.net.au wrote:
From: James Mills prolo...@shortcircuit.net.au
Subject: Re: NameError: how to get the name?
To: Yingjie Lan lany...@yahoo.com
Cc: python list python-list@python.org
Date: Saturday, April 24, 2010, 4:03 PM
On Sat, Apr 24
Yingjie Lan wrote:
--- On Sat, 4/24/10, Steven D'Aprano st...@remove-this-cybersource.com.au
wrote:
From: Steven D'Aprano st...@remove-this-cybersource.com.au
Subject: Re: NameError: how to get the name?
To: python-list@python.org
Date: Saturday, April 24, 2010, 4:07 PM
On Sat, 24 Apr 2010
--- On Sat, 4/24/10, Gary Herron gher...@islandtraining.com wrote:
From: Gary Herron gher...@islandtraining.com
Subject: Re: NameError: how to get the name?
To:
Cc: python-list@python.org
Date: Saturday, April 24, 2010, 8:03 PM
Yingjie Lan wrote:
--- On Sat, 4/24/10, Steven D'Aprano st
-this-cybersource.com.au
wrote:
From: Steven D'Aprano st...@remove-this-cybersource.com.au
Subject: Re: NameError: how to get the name?
To: python-list@python.org
Date: Saturday, April 24, 2010, 4:07 PM
On Sat, 24 Apr 2010 04:19:43 -0700,
Yingjie Lan wrote:
I wanted to do something
--- On Sun, 4/25/10, Chris Rebert c...@rebertia.com wrote:
From: Chris Rebert c...@rebertia.com
Subject: Re: NameError: how to get the name?
To: Yingjie Lan lany...@yahoo.com
Cc: python-list@python.org
Date: Sunday, April 25, 2010, 3:27 AM
On Sat, Apr 24, 2010 at 4:17 PM,
Yingjie Lan lany
11 matches
Mail list logo