On Tue, 29 Mar 2005 14:34:39 GMT, Ron_Adam <[EMAIL PROTECTED]> wrote: > On 28 Mar 2005 23:01:34 -0800, "Dan Bishop" <[EMAIL PROTECTED]> wrote: > > >>>> def print_vars(vars_dict=None): > >... if vars_dict is None: > >... vars_dict = globals() > >... for var, value in vars_dict.items(): > >... print '%s = %r' % (var, value) > >... > >>>> myPlace = 'right here' > >>>> myTime = 'right now' > >>>> print_vars() > >print_vars = <function print_vars at 0x401e0d84> > >__builtins__ = <module '__builtin__' (built-in)> > >myTime = 'right now' > >myPlace = 'right here' > >__name__ = '__main__' > >__doc__ = None > > Fred = 5 > John = 8 > Winner = John > > Both John and Winner are pointing to the literal '8'.
ummm, yes, of course they are. What's your point? > > Mixing data and program code, ie.. variable names as data, is not a > good idea. Down with eval! Exile exec! A pox on both their houses! (i.e. I respectfully disagree that mixing data with program code is a bad idea) Peace Bill Mill bill.mill at gmail.com -- http://mail.python.org/mailman/listinfo/python-list