[Python-ideas] Keyword only argument on function call

Jonathan Fine jfine2358 at gmail.com
Thu Sep 6 13:45:45 EDT 2018


I missed an important line of code. Here it is:

    >>> aaa = 'telltale'

Once you have that, these will work:

      >>> eval('aaa', fn.__globals__)
      'telltale'

      >>> __name__
      '__main__'
      >>> import sys
      >>> getattr(sys.modules[__name__], 'aaa')
     'telltale'

-- 
Jonathan


More information about the Python-ideas mailing list