J2 proposal: keyword

Anthony Baxter anthonybaxter at gmail.com
Mon Aug 23 05:24:02 EDT 2004


On 23 Aug 2004 02:13:48 -0700, Paul Rubin
<"http://phr.cx"@nospam.invalid> wrote:
> Semi-OT: since there's been all this noise about not wanting to
> separate the decorators too much from the function name, etc., why are
> "accepts" and "returns" decorators instead of having that stuff in
> the function def itself?  E.g.:

At some point in the future, there probably will be a decent way to
spell the (optional) typing of arguments. The 'accepts()' and
'returns()' decorators are really just strawmen for example's sake -
if you like, you could use a more realistic example like
'applies(date(2004,5,1),date(2004,5,5))' or some such.



More information about the Python-list mailing list