[Python-Dev] Re: new syntax for wrapping (PEP 318)

Nick Coghlan ncoghlan at iinet.net.au
Thu Feb 26 06:25:59 EST 2004


Moore, Paul wrote:
> [1] Except for extremely stylised cases like [classmethod], which will
>     be for particular use cases - and you can look that one up under
>     "classmethod"...

I find this an interesting point - almost certainly, the introduction 
process for this syntax is going to be via one of the decorators in the 
standard library (classmethod, staticmethod, ?), which can be looked up 
directly.

The write-ups for these would include a link to what a function 
decorator _is_, so that people can then learn that Python function 
decorators don't restrict you to whatever modifiers the language 
designers felt like providing (ala C, C++, Java etc).

(Odd thought for the evening:
   def myFunc (arg) [private]: pass

where 'private' wraps a function in some code that does some 
introspection to give you a _real_ private function, that refuses to be 
called from outside its defining context. Slow as hell, and the 
psuedo-privacy of name-mangling is generally enough, but just something 
that occured to me)

Regards,
Nick.

-- 
Nick Coghlan               |     Brisbane, Australia
Email: ncoghlan at email.com  | Mobile: +61 409 573 268



More information about the Python-Dev mailing list