[Python-Dev] PEP 318: Let's not give in to FUD (original) (raw)

Greg Ewing greg at cosc.canterbury.ac.nz
Thu Apr 1 19:05:39 EST 2004


I think most of the worry about long, complicated decorator lists with baroque parameters is FUD. What are the realistic use cases for such things? I don't remember seeing any proposed.

The ones I have seen proposed (e.g. PyObjC) use only one or two decorators at a time, and if there are any parameters, they're not lengthly.

Furthermore, if in some circumstance someone finds themselves writing decorator lists so long that they become unreadable, well, there are ways of dealing with that. For example,

foo_decorators = decorator_list(

Big long-winded

list of

decorators

)

def foo(args) [foo_decorators]: ...

which is not much different from Guido's preceding-list version, with the advantage that it's explicit about the fact that you need to look above to get the full picture.

Please let's not allow unfounded speculation to get in the way of coming up with a nice syntax that works well in the majority of cases we expect to actually see.

Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+



More information about the Python-Dev mailing list