On 3/6/07, Mike Klaas <[EMAIL PROTECTED]> wrote:
> There's nothing quite like running help(func) and getting *args,
> **kwargs as the documented parameter list.
I think
>>> import resource
>>> help(resource.getpagesize)
Help on built-in function getpagesize in module resource:
getpagesize(...)
On 3/6/07, Greg Ewing <[EMAIL PROTECTED]> 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,
>
Andrew Dalke wrote:
> def __init__(self, prec=None, rounding=None,
> traps=None, flags=None,
> _rounding_decision=None,
> Emin=None, Emax=None,
> capitals=None, _clamp=0,
> _ignored_flags=None):
> ..
d
Cc: Guido van Rossum; python-dev@python.org
Subject: Re: [Python-Dev] locals(), closures, and IronPython...
On 3/5/07, Dino Viehland <[EMAIL PROTECTED]> wrote:
> Thanks Guido. It might take some time (and someone may very well beat me to
> it if they care a lot) but I'll see if
On Tue, Mar 06, 2007, Andrew Dalke wrote:
> On 3/5/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
>>
>> I don't know too many good use cases for
>> locals() apart from "learning about the implementation" I think this
>> might be okay.
>
> Since I'm watching this list for any discussion on the tra
ass to locals.
Jeremy
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Guido van
> Rossum
> Sent: Monday, March 05, 2007 2:14 PM
> To: Dino Viehland
> Cc: python-dev@python.org
> Subject: Re: [Python-Dev] locals(), closures, and I
On 3/5/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> I don't know too many good use cases for
> locals() apart from "learning about the implementation" I think this
> might be okay.
Since I'm watching this list for any discussion on the traceback
threads, I figured I would point out the most c
"Dino Viehland" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
def a():
x = 4
y = 2
def b():
print y, locals()
print locals()
b()
a()
in CPython prints:
{'y': 2, 'x': 4,
Dino Viehland
Cc: python-dev@python.org
Subject: Re: [Python-Dev] locals(), closures, and IronPython...
Jeremy Hylton has been asking questions about this too at the sprint
after PyCon. I'm tempted to accept that the exact behavior of locals()
is implementation-defined (IOW undefined :-) as
Jeremy Hylton has been asking questions about this too at the sprint
after PyCon. I'm tempted to accept that the exact behavior of locals()
is implementation-defined (IOW undefined :-) as long as it includes
the locals defined in the current scope; whether it also includes free
variables could be d
def a():
x = 4
y = 2
def b():
print y, locals()
print locals()
b()
a()
in CPython prints:
{'y': 2, 'x': 4, 'b': }
2 {'y': 2}
I'm wondering if it's intentional that these don't print d
11 matches
Mail list logo