[Python-Dev] More concerns about decorators

Roman Suzi rnd at onego.ru
Mon Aug 16 06:41:43 CEST 2004


After playing with decorators alittle I found that @-syntax is nearly optimal
especially that it comes before def, but there are other things to keep in
mind.

1. Decorators must transfer __doc__-strings and probably even
add information about functions

2. As now functions could have arbitrary attributes, some
mechanism must be in place to ensure this information is not lost.
If it is purely up to the decorator to decide, we will end up with
undocumented functions...

Is it possible to change function inplace? Is it even an option?

Sincerely yours, Roman Suzi
-- 
rnd at onego.ru =\= My AI powered by GNU/Linux RedHat 7.3


More information about the Python-Dev mailing list