Message268620
Hi, I've written a patch to accomplish this in Py3.6.
This patch is much cleaner but has one drawback, when used as decorator factory, you have to specify name as a keyword argument. But considering the codes that have to been imported to check arguments, I think it's not bad. (I don't want to check `function` is a string or not.)
Also one side effect that I can not eliminate is when it is used as a normal function, the function instead of None is returned. I see the former patches get this problem too.
Hope to get feedback. |
|
Date |
User |
Action |
Args |
2016-06-15 15:22:12 | xiang.zhang | set | recipients:
+ xiang.zhang, brian.curtin, ahojnnes, santoso.wijaya, Claudiu.Popa, berker.peksag |
2016-06-15 15:22:12 | xiang.zhang | set | messageid: <1466004132.68.0.301732323436.issue7769@psf.upfronthosting.co.za> |
2016-06-15 15:22:12 | xiang.zhang | link | issue7769 messages |
2016-06-15 15:22:12 | xiang.zhang | create | |
|