[Python-Dev] Decorator keyword possibility? (original) (raw)
Nick Coghlan ncoghlan at iinet.net.au
Thu Aug 12 01:26:38 CEST 2004
- Previous message: [Python-Dev] Unifying Long Integers and Integers: baseint
- Next message: [Python-Dev] Re: Re: Update PEP 292
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Someone recently suggested 'remake' as a possible replacement for '@'
I don't like that name because Python doesn't use the word 'make' for anything. However, it immediately prompted the thought of 'redef'
After all, decorator's effectively 'redefine' the original 'define' block, to mean something else.
And the old decorator syntax is definitely a 'redefinition' syntax.
However, the problem with that word is that you would expect it to come after the definition (like the old syntax does). Which leads to the actual suggestion of a 'predefinition'.
That is, we're going to tell you about the definition before we actually get to it.
And so, on with the examples:
class demo(object):
predef classmethod def foo(cls): pass
predef staticmethod def bar(): pass
predef accepts(int, int) predef returns(bool) predef someOtherDecorator(anarg, anotherarg, yetanotherarg) def foobar(self, apples, oranges): """Compares apples and oranges""" return apples < oranges
Regards, Nick.
-- Nick Coghlan | Eugene, Oregon Email: ncoghlan at email.com | USA
- Previous message: [Python-Dev] Unifying Long Integers and Integers: baseint
- Next message: [Python-Dev] Re: Re: Update PEP 292
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]