This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xiang.zhang
Recipients Claudiu.Popa, ahojnnes, berker.peksag, brian.curtin, santoso.wijaya, xiang.zhang
Date 2016-06-15.15:22:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1466004132.68.0.301732323436.issue7769@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-06-15 15:22:12xiang.zhangsetrecipients: + xiang.zhang, brian.curtin, ahojnnes, santoso.wijaya, Claudiu.Popa, berker.peksag
2016-06-15 15:22:12xiang.zhangsetmessageid: <1466004132.68.0.301732323436.issue7769@psf.upfronthosting.co.za>
2016-06-15 15:22:12xiang.zhanglinkissue7769 messages
2016-06-15 15:22:12xiang.zhangcreate