On Sat, 18 Feb 2006 01:09:22 +0100, Ronny Mandal wrote:
> Assume we have a class Foo, and instance called bar.
>
> a variable called baz1 has the value 3.0, baz2 is uninitialized
Python doesn't have variables. It has names which are bound to objects. Do
you mean that the name baz1 is bound to th
Ronny> Assume we have a class Foo, and instance called bar. a variable
Ronny> called baz1 has the value 3.0, baz2 is uninitialized
Ronny> Is there a way of reflecting the variable with such syntax:
Ronny> print bar[], where var_index is a number representing
Ronny> internal
Ronny Mandal wrote:
> Assume we have a class Foo, and instance called bar.
>
> a variable called baz1 has the value 3.0, baz2 is uninitialized
>
> Is there a way of reflecting the variable with such syntax:
>
> print bar[], where var_index is a number representing
> internal index.
>
> bar[] =
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Ronny Mandal wrote:
> Assume we have a class Foo, and instance called bar.
>
> a variable called baz1 has the value 3.0, baz2 is uninitialized
>
> Is there a way of reflecting the variable with such syntax:
>
> print bar[], where var_index is a numb
Assume we have a class Foo, and instance called bar.
a variable called baz1 has the value 3.0, baz2 is uninitialized
Is there a way of reflecting the variable with such syntax:
print bar[], where var_index is a number representing
internal index.
bar[] = 4.2. #Setting baz2 to 4.2
Thanks and re