decorator with keyword
Reinhold Birkenfeld
reinhold-birkenfeld-nospam at wolke7.net
Thu Aug 12 16:23:25 EDT 2004
Christopher T King wrote:
> On Thu, 12 Aug 2004, Peter Otten wrote:
>
>> [decorator examples]
>
> +2 on this (can I give a +2?). It's not only pretty, but it addresses my
> gripe about decorators being used for too many purposes (by providing a
> clean way to supply function attributes). Additionally, by moving
> docstrings into the transform: block, this provides an easy way to
> document the generated function, rather than forcing decorators to
> preserve docstrings by copying the decoratee's docstring into the
> decorated function.
>
> The PythonDecorators wiki doesn't say Guido has specifically shot this
> style down, so it may yet have a chance.
I would also support this variant. I was a supporter of list-after-def,
but this seems to me pythonic AND readable.
+1! Hope Guido hears about that proposal!
Reinhold
--
Wenn eine Linuxdistribution so wenig brauchbare Software wie Windows
mitbrächte, wäre das bedauerlich. Was bei Windows der Umfang eines
"kompletten Betriebssystems" ist, nennt man bei Linux eine Rescuedisk.
-- David Kastrup in de.comp.os.unix.linux.misc
More information about the Python-list
mailing list