On 8/21/07, rodrigo <[EMAIL PROTECTED]> wrote:
> How would I go about retrieving a variable's name (not its value)?
http://effbot.org/pyfaq/how-can-my-code-discover-the-name-of-an-object.htm
--
Cheers,
Simon B.
[EMAIL PROTECTED]
http://www.brunningonline.net/simon/blog/
GTalk:
rodrigo wrote:
> How would I go about retrieving a variable's name (not its value)? I
> want to write a function that, given a list of variables, returns a
> string with each variable's name and its value, like:
>
> a: 100
> b: 200
>
> I get the feeling this
You're right, Paul, Evan, James, I should just use a dictionary.
Thanks!
Rodrigo
--
http://mail.python.org/mailman/listinfo/python-list
rodrigo wrote:
> How would I go about retrieving a variable's name (not its value)? I
> want to write a function that, given a list of variables, returns a
> string with each variable's name and its value, like:
>
> a: 100
> b: 200
>
> I get the feeling this
On 8/20/07, Evan Klitzke <[EMAIL PROTECTED]> wrote:
> On 8/20/07, rodrigo <[EMAIL PROTECTED]> wrote:
> > How would I go about retrieving a variable's name (not its value)? I
> > want to write a function that, given a list of variables, returns a
> > string w
rodrigo <[EMAIL PROTECTED]> writes:
> How would I go about retrieving a variable's name (not its value)? I
> want to write a function that, given a list of variables, returns a
> string with each variable's name and its value, like:
>
> a: 100
> b: 200
>
>
On 8/20/07, rodrigo <[EMAIL PROTECTED]> wrote:
> How would I go about retrieving a variable's name (not its value)? I
> want to write a function that, given a list of variables, returns a
> string with each variable's name and its value, like:
>
> a: 100
> b:
On 20 ago, 22:03, rodrigo <[EMAIL PROTECTED]> wrote:
> How would I go about retrieving a variable's name (not its value)? I
> want to write a function that, given a list of variables, returns a
> string with each variable's name and its value, like:
>
> a: 100
>
How would I go about retrieving a variable's name (not its value)? I
want to write a function that, given a list of variables, returns a
string with each variable's name and its value, like:
a: 100
b: 200
I get the feeling this is trivial, but I have been unable to find an
answer