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/2007-March/071646.html below:

[Python-Dev] locals(), closures, and IronPython...

[Python-Dev] locals(), closures, and IronPython...Mike Klaas mike.klaas at gmail.com
Wed Mar 7 00:23:11 CET 2007
On 3/6/07, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:

> Although you can get a similar effect now by doing
>
>       def __init__(self, **kwds):
>          args = dict(prec=None, rounding=None,
>                    traps=None, flags=None,
>                    _rounding_decision=None,
>                    Emin=None, Emax=None,
>                    capitals=None, _clamp=0,
>                    _ignored_flags=None)
>          args.update(kwds)
>          for name, value in args:
>             ...
>
> So, no need for locals() here.

Yes, that is the obvious approach.  But it is painful to abandon the
introspectable signature.

There's nothing quite like running help(func) and getting *args,
**kwargs as the documented parameter list.

-Mike
More information about the Python-Dev mailing list

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