Re: tokenize.untokenize adding line continuation characters

2017-01-17 Thread sg552
On Tuesday, January 17, 2017 at 2:47:03 AM UTC, Steven D'Aprano wrote: > On Tuesday 17 January 2017 09:42, Rotwang wrote: > > > Here's something odd I've found with the tokenize module: > [...] > > Copypasted from iPython: > > It's not impossible that iPython is doing something funny with the to

Re: Getting globals of the caller, not the defining module

2013-11-11 Thread sg552
(Sorry for posting through GG, I'm at work.) On Monday, November 11, 2013 11:25:42 AM UTC, Steven D'Aprano wrote: > Suppose I have a function that needs access to globals: > > # module A.py > def spam(): > g = globals() # this gets globals from A > introspect(g) > > As written, spam() o