Bad programming style?

Sposhua sposhua at my.pc
Wed Dec 22 09:01:57 EST 1999


I'm sure this is bad programming (though I'm sure I'll be proved wrong), but I'd
like to know how to do it anyway...

I want to create a varaible name and use it as a normal variable, something
like:

c=['r','g','b']
VARIABLE_CALLED(c[0])='ff'

obviously there are ways around it using dictionaries or whatever, but I'd like
to know if it's possible to actually _create_ this variable r='ff' 'on the
fly'. And can anyone tell me if it actually has any use.

Did that sense make??




More information about the Python-list mailing list