From: Stephen Hansen on 3 Jul 2010 01:37 On 7/2/10 11:58 AM, Alf P. Steinbach /Usenet wrote: > <code> > #Py3 I'm stuck on Python 2.x, as I mentioned (albeit only in a comment). That said this code does not seem to be including any Py3isms that aren't compatible. > class Thing(object): > @expose() > def test1(self, arg1): > return arg1 > > @expose( "testing" ) > def test2(self, arg2): > return arg2 Its the @expose() which bugs me. I have some decorators (made by me and others) which have no args, that look like @hello. Then some which always have args, that look like @hello("whatsup dude"). To then have a decorator which has no args as @hello(), I can't abide. For internal consistancy purposes, I want "no arguments" to always look like @hello, and "arguments" to look like @hello(something). I don't want to have to think, "Hey, does this no-arg version require parens or no?" -- Stephen Hansen ... Also: Ixokai ... Mail: me+list/python (AT) ixokai (DOT) io ... Blog: http://meh.ixokai.io/
First
|
Prev
|
Pages: 1 2 Prev: drag & drop in a python GUI application Next: Importing package with zip-archives |