[Python-Dev] PEP 318: Decorators last before colon (original) (raw)
Hernan Foffani hernan at orgmf.com.ar
Mon Apr 5 12:09:23 EDT 2004
- Previous message: [Python-Dev] The Need for a Declarative Syntax Element (aka
- Next message: [Python-Dev] Re: Python-Dev Digest, Vol 9, Issue 17
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
... The * prefix looks so arbitrary: why not /, why not @, etc...
It's curious that '@' was brought. I bet it won't be included in the proposal but it should be mentioned that there's a notorious corner use case using a symetrical syntax with a prefix-postfix pair of characters. With proper semantics and honoring lowercase plus underscore name style, it may look like this:
o_o = [wow, it, reminds, me, ol, uncle, Pep]
class Giuseppe(object):
@[o_o]@
def pepper_peps_up_the_pep_thread(self):
pass # heh... where's the "pess" reserved werd?(BIG :-D if it wasn't clear enough) Now seriously... Don't know if it was mentioned before or even if it's relevant but I strongly believe that most .NET programmers will understand its meaning (even no-C# ones) and also java ones will (they might not reckon it though ;-) yet still considering the fact that python's decorators will be more powerful.
FWIW: For reasons already given in previous messages I do prefer decorator-before-def-plus-star syntax (prefix only ;-)
Regards, -Hernan
do i send this or not? yes, no, yes, no, yes...
- Previous message: [Python-Dev] The Need for a Declarative Syntax Element (aka
- Next message: [Python-Dev] Re: Python-Dev Digest, Vol 9, Issue 17
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]