On Sun, 03 Apr 2005 08:32:09 +0200, Martin v. Löwis
[EMAIL PROTECTED] wrote:
Ron_Adam wrote:
I wasn't aware that the form:
result = function(args)(args)
Was a legal python statement.
So python has a built in mechanism for passing multiple argument sets
to nested defined functions!
it reaches the inner loop which is
then attached to the function name. Is this correct now?
Cheers,
Ron
### Decorator Dissection V.2 ###
print \n(0) Start reading decorator defs
def decorator(d_arg):
print (3) decorator: gets '+d_arg+'
def get_function(function):
print (6
I followed that part. The part that I'm having problems with is the
first nested function get's the argument for the function name without
a previous reference to the argument name in the outer frames. So, a
function call to it is being made with the function name as the
argument, and that
On 2 Apr 2005 08:39:35 -0800, Kay Schluehr [EMAIL PROTECTED]
wrote:
There is actually nothing mysterious about decorators.
I've heard this quite a few times now, but *is* quite mysterious if
you are not already familiar with how they work. Or instead of
mysterious, you could say complex, as
Ron_Adam wrote:
On 2 Apr 2005 08:39:35 -0800, Kay Schluehr [EMAIL PROTECTED]
wrote:
There is actually nothing mysterious about decorators.
I've heard this quite a few times now, but *is* quite mysterious if
you are not already familiar with how they work. Or instead of
mysterious, you
On Sat, 02 Apr 2005 21:04:57 +0200, Diez B. Roggisch
[EMAIL PROTECTED] wrote:
I followed that part. The part that I'm having problems with is the
first nested function get's the argument for the function name without
a previous reference to the argument name in the outer frames. So, a
On Sat, 02 Apr 2005 18:39:41 GMT, Ron_Adam [EMAIL PROTECTED]
wrote:
def foo():
a = 10
def bar():
return a*a
return bar
print foo()() --- *Here*
No decorator-specific magic here - just references kept to outer frames
which form the scope for the inner function.
On Sat, 02 Apr 2005 21:04:57 +0200, Diez B. Roggisch [EMAIL PROTECTED]
wrote:
I followed that part. The part that I'm having problems with is the
first nested function get's the argument for the function name without
a previous reference to the argument name in the outer frames. So, a
Ron_Adam wrote:
I wasn't aware that the form:
result = function(args)(args)
Was a legal python statement.
So python has a built in mechanism for passing multiple argument sets
to nested defined functions! (click) Which means this is a decorator
without the decorator syntax.
No. There is