Stephen Boulet stephen.bou...@gmail.com writes:
Does an arbitrary variable carry an attribute describing the text in
its name? I'm looking for something along the lines of:
x = 10
print x.name
'x'
Perhaps the x.__getattribute__ method? Thanks.
The first thing is... what is your use case
On Sep 9, 9:11 pm, Albert Hopkins mar...@letterboxes.org wrote:
On Thu, 2010-09-09 at 12:43 -0700, Stephen Boulet wrote:
Does an arbitrary variable carry an attribute describing the text in
its name? I'm looking for something along the lines of:
x = 10
print x.name
'x'
Perhaps the
On 9 September 2010 20:43, Stephen Boulet stephen.bou...@gmail.com wrote:
Does an arbitrary variable carry an attribute describing the text in
its name? I'm looking for something along the lines of:
x = 10
print x.name
'x'
Does an arbitrary variable carry an attribute describing the text in
its name? I'm looking for something along the lines of:
x = 10
print x.name
'x'
Perhaps the x.__getattribute__ method? Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 2010-09-09 at 12:43 -0700, Stephen Boulet wrote:
Does an arbitrary variable carry an attribute describing the text in
its name? I'm looking for something along the lines of:
x = 10
print x.name
'x'
Perhaps the x.__getattribute__ method? Thanks.
Variables are not objects and so
On 9/9/2010 3:43 PM, Stephen Boulet wrote:
In Python, 'variable' is a synonym for name and identifier,'
An object can have 0 to many names attached to it. An object can also be
a member of 0 to many collections.
Modules, classes, and functions have 'definition name' strings attached
to them
Albert Hopkins mar...@letterboxes.org writes:
On Thu, 2010-09-09 at 12:43 -0700, Stephen Boulet wrote:
Does an arbitrary variable carry an attribute describing the text in
its name?
Variables are not objects and so they have no attributes.
Another way of thinking about is that there are
Stephen Boulet wrote:
Does an arbitrary variable carry an attribute describing the text in
its name? I'm looking for something along the lines of:
x = 10
print x.name
'x'
Perhaps the x.__getattribute__ method? Thanks.
Hmm. Recent scholarship suggests that the Iliad and the Odyssey may