[Python-Dev] Re: decorators and 2.4

Chermside, Michael mchermside at ingdirect.com
Tue Jun 29 08:55:53 EDT 2004

Jeff Bone writes:
> I would say that all such uses --- when the "outer" function doesn't 
> impact state or type of the wrapped function, except perhaps to extend 
> it (w/, e.g., exceptions, such as potentially in pre- and post-) --- 
> can more of less be thought of as "declarative."

Since one of my examples specifically included modifying the parameter
list of the decorated function, I'm a little puzzled by what you
mean by "doesn't impact state or type of the wrapped function". But
what IS clear to me is that your definition of "declarative" and
mine are different. Okay... I can live with that.

After careful reading of your responses to me and to Phillip, I have
concluded (rightly or wrongly) that the real core we are arguing about
here is whether or not decorators should be restricted in ways that
would help with static type analysis of Python code. But although I
happen to be a static-typing fan (a scary thing to admit in THIS
newsgroup), I do NOT believe that static typing (in general) is
possible in Python (StarKiller notwithstanding). I don't think we're
risking breaking something here that isn't already very, VERY broken.
The fact that it is ALREADY possible to achieve the same ends by
rebinding the function after declaring it proves as much.

So, unless you can give me an argument I understand OTHER than static
type analysis, I'm going to go ahead and conclude that I just
disagree with you here and that we've likely learned as much from
each other as we are likely to for the moment.

-- Michael Chermside

This email may contain confidential or privileged information. If you believe you have received the message in error, please notify the sender and delete the message without copying or disclosing it.

More information about the Python-Dev mailing list