Luis M. González wrote:

I still don't understand why is it a bad idea in the case of
globals().
This is the only way I know to define variables programatically in the
top-level namespace, without having to do it manually one by one.

The point is that creating variables whose names are computed
at run time is usually a misguided thing to do in the first
place.

Think about it -- how are you going to *use* those variables
that you've created?

If the answer is that you're going to go looking for a way
to read the values of variables whose names are computed at
run time, you might as well not use variables at all, but
just keep their values in a dictionary.

--
Greg
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to