Two standard libraries?

Kirk McDonald kirklin.mcdonald at gmail.com
Mon Jul 16 11:51:35 PDT 2007


Robert Fraser wrote:
> Well, not even scripting languages keep names of local variables in
> memory at runtime...

Hmm?

 >>> a = 12
 >>> b = 'waffles'
 >>> locals()
{'__builtins__': <module '__builtin__' (built-in)>, '__name__': 
'__main__', 'b': 'waffles', '__doc__': None, 'a': 12}
 >>> "%(a)s %(b)s" % locals()
'12 waffles'

-- 
Kirk McDonald
http://kirkmcdonald.blogspot.com
Pyd: Connecting D and Python
http://pyd.dsource.org



More information about the Digitalmars-d mailing list