Steven D'Aprano wrote:
On Thu, 01 Apr 2010 00:27:51 +0100, MRAB wrote:
A decorator shouldn't call the function it's decorating.
*raises eyebrow*
Surely, in the general case, a decorator SHOULD call the function it is
decorating? I'm sure you know that, but your wording is funny and could
MRAB wrote:
Steven D'Aprano wrote:
On Thu, 01 Apr 2010 00:27:51 +0100, MRAB wrote:
A decorator shouldn't call the function it's decorating.
*raises eyebrow*
Surely, in the general case, a decorator SHOULD call the function it is
decorating? I'm sure you know that, but your wording is funny
On Apr 1, 6:16 am, Steve Holden st...@holdenweb.com wrote:
MRAB wrote:
I had the following idea: define the terms 'decorator', 'decoration' and
'decoratee'. The decorator applies the decoration to the decoratee. The
decoratee is the function defined locally in the decorator.
It would
Steve Holden wrote:
MRAB wrote:
Steven D'Aprano wrote:
On Thu, 01 Apr 2010 00:27:51 +0100, MRAB wrote:
A decorator shouldn't call the function it's decorating.
*raises eyebrow*
Surely, in the general case, a decorator SHOULD call the function it is
decorating? I'm sure you know that, but
On Mar 30, 2:41 pm, MRAB pyt...@mrabarnett.plus.com wrote:
LX wrote:
On Mar 29, 6:34 pm, MRAB pyt...@mrabarnett.plus.com wrote:
LX wrote:
Hi all, I have a question about decorators. I would like to use them
for argument checking, and pre/post conditions. However, I don't want
the
LX wrote:
On Mar 30, 2:41 pm, MRAB pyt...@mrabarnett.plus.com wrote:
LX wrote:
On Mar 29, 6:34 pm, MRAB pyt...@mrabarnett.plus.com wrote:
LX wrote:
Hi all, I have a question about decorators. I would like to use them
for argument checking, and pre/post conditions. However, I don't want
the
On 2010-03-31 13:59:01 -0700, LX said:
pass_decorator will be called when the decorated function is _defined_,
but not when the decorated function is _called_.
Why is it then that during runtime, with a breakpoint in some
arbitrary main() in main.py, I get something similar to the following
On Wed, 31 Mar 2010 22:27:05 +0100, MRAB wrote:
LX wrote:
[...]
It looks to me the call stack still includes the additional level of
the decorator... what am I missing? Thank you for your time.
Are you still defining your decorators in the same way as in your
original post?
A decorator
Steven D'Aprano wrote:
On Wed, 31 Mar 2010 22:27:05 +0100, MRAB wrote:
LX wrote:
[...]
It looks to me the call stack still includes the additional level of
the decorator... what am I missing? Thank you for your time.
Are you still defining your decorators in the same way as in your
original
On Mar 31, 2:28 pm, Stephen Hansen apt.shan...@gmail.invalid wrote:
On 2010-03-31 13:59:01 -0700, LX said:
pass_decorator will be called when the decorated function is _defined_,
but not when the decorated function is _called_.
Why is it then that during runtime, with a breakpoint in
On Thu, 01 Apr 2010 00:27:51 +0100, MRAB wrote:
A decorator shouldn't call the function it's decorating.
*raises eyebrow*
Surely, in the general case, a decorator SHOULD call the function it is
decorating? I'm sure you know that, but your wording is funny and could
confuse the OP.
On Mar 29, 6:34 pm, MRAB pyt...@mrabarnett.plus.com wrote:
LX wrote:
Hi all, I have a question about decorators. I would like to use them
for argument checking, and pre/post conditions. However, I don't want
the additional overhead when I run in non-debug mode. I could do
something like
On Mar 29, 7:11 pm, Steven D'Aprano
ste...@remove.this.cybersource.com.au wrote:
On Mon, 29 Mar 2010 17:54:26 -0700, LX wrote:
Hi all, I have a question about decorators. I would like to use them for
argument checking, and pre/post conditions. However, I don't want the
additional overhead
LX wrote:
On Mar 29, 6:34 pm, MRAB pyt...@mrabarnett.plus.com wrote:
LX wrote:
Hi all, I have a question about decorators. I would like to use them
for argument checking, and pre/post conditions. However, I don't want
the additional overhead when I run in non-debug mode. I could do
something
Hi all, I have a question about decorators. I would like to use them
for argument checking, and pre/post conditions. However, I don't want
the additional overhead when I run in non-debug mode. I could do
something like this, using a simple trace example.
@decorator
def pass_decorator(f, *args,
LX wrote:
Hi all, I have a question about decorators. I would like to use them
for argument checking, and pre/post conditions. However, I don't want
the additional overhead when I run in non-debug mode. I could do
something like this, using a simple trace example.
@decorator
def
16 matches
Mail list logo