looking for way to include many times some .py code from anotherpython code
Duncan Booth
duncan.booth at invalid.invalid
Tue Mar 8 08:59:01 EST 2005
Martin MOKREJ wrote:
> Am I so deperately fighting the language? No-one here on the list
> needs to set hundreds variables at once somewhere in their code? I
> still don't get why:
I've certainly never needed to set hundreds of variables at once in my
code. I might have hundreds of values, but if so they go into a list or a
dictionary or some other suitable data structure.
There isn't any point setting hundreds of variables unless you also
have hundreds of different expressions accessing hundreds of variables. If
they are all accessed in a similar way then this indicates they shouldn't
be separate variables. If they are all accessed differently then you have
some very complex code and hard to maintain code which can probably be
simplified.
Can you give a use case where you think 'hundreds of variables' would be
needed?
More information about the Python-list
mailing list