[Python-Dev] Re: PEP 318: Decorators last before colon
Neil Schemenauer
nas-python at python.ca
Wed Mar 31 19:15:31 EST 2004
On Wed, Mar 31, 2004 at 07:08:44PM -0500, Bob Ippolito wrote:
> On Mar 31, 2004, at 6:43 PM, Neil Schemenauer wrote:
> > def someObjectiveCSelector_itsReallyLong_(takes, some, args, here):
> > pass
> > objc.selector(_, signature='some type signature')
> >
> >That looks pretty nice and is even shorter to type than the proposed
> >syntax.
>
> No, that is not correct.. it must rebind the name... it doesn't mutate
> the function, it returns a selector descriptor.
You can do that via sys._getframe(). Ugly but better, IMHO, than
adding half-baked syntax to the language.
Neil
More information about the Python-Dev
mailing list