> Anyway, I don´t see the point in this. Why don´t you just use
> something like X['g'] instead?
While it's not what the original author is intending, it seems to me
that dynamically adding fields could be useful when something like a
database schema changed frequently. For example, a row in a da
On 10 ago, 00:11, Lee Sander <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to define a new variable which is not predefined by me.
> For example,
> I want to create an array called "X%s" where "%s" is to be determined
> based on the data I am processing. So, for example, if I the file
> I'm rea
Lee Sander a écrit :
> Hi,
>
> I would like to define a new variable which is not predefined by me.
> For example,
> I want to create an array called "X%s" where "%s" is to be determined
> based on the data I am processing. So, for example, if I the file
> I'm reading has
> g 99
> on the first lin
On Aug 9, 6:11 pm, Lee Sander <[EMAIL PROTECTED]> wrote:
> I would like to define a new variable which is not predefined by me.
> For example,
> I want to create an array called "X%s" where "%s" is to be determined
> based on the data I am processing.
Use a dictionary.
--
http://mail.python.org/
Lee Sander wrote:
> Hi,
>
> I would like to define a new variable which is not predefined by me.
> For example,
> I want to create an array called "X%s" where "%s" is to be determined
> based on the data I am processing. So, for example, if I the file
> I'm reading has
> g 99
> on the first line,
On Aug 9, 5:30 pm, Dustan <[EMAIL PROTECTED]> wrote:
> given the
> variables data (the dictionary), name (in your example, 'g') and
> *size* (in your example, 99), you can add it data as shown:
erm... make that:
given the variables data (the dictionary), name (in your example, 'g')
and size (in
On Aug 9, 5:11 pm, Lee Sander <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to define a new variable which is not predefined by me.
> For example,
> I want to create an array called "X%s" where "%s" is to be determined
> based on the data I am processing. So, for example, if I the file
> I'm re
Hi,
I would like to define a new variable which is not predefined by me.
For example,
I want to create an array called "X%s" where "%s" is to be determined
based on the data I am processing. So, for example, if I the file
I'm reading has
g 99
on the first line, I want to create a new variable cal