A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-October/010212.html below:

getting at the current frame

[Python-Dev] Re: getting at the current frame [Python-Dev] Re: getting at the current framebarry@wooz.org barry@wooz.org
Mon, 30 Oct 2000 11:14:53 -0500 (EST)
>>>>> "MvL" == Martin v Loewis <martin@loewis.home.cs.tu-berlin.de> writes:

    MvL> What's wrong with

    MvL>     def trade(yours, mine): print _('if you give me
    MvL> %(yours)s, i will give you %(mine)s') % vars()

    MvL> Look Ma, no magic!

Except that I also want globals() to be included and vars() doesn't
include that.  I really want:

    d = globals().copy()
    d.update(locals())

but I've also noticed that you sometimes want attribute following so
you can do things like

    _('the name of the list is %(mlist.listname)')

-Barry



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4