[Python-Dev] locals(), closures, and IronPython... (original) (raw)
Mike Klaas mike.klaas at gmail.com
Wed Mar 7 00:23:11 CET 2007
- Previous message: [Python-Dev] locals(), closures, and IronPython...
- Next message: [Python-Dev] locals(), closures, and IronPython...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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, roundingdecision=None, Emin=None, Emax=None, capitals=None, clamp=0, ignoredflags=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
- Previous message: [Python-Dev] locals(), closures, and IronPython...
- Next message: [Python-Dev] locals(), closures, and IronPython...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]