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 magnusc
Recipients ezio.melotti, magnusc, michael.foord, r.david.murray, rbcollins, rhettinger, serhiy.storchaka, steven.daprano
Date 2015-05-06.13:54:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1430920498.84.0.578943655812.issue24134@psf.upfronthosting.co.za>
In-reply-to
Content
"The solution to that is to always have a test that your decorator actually returns a function. That's what I do."

Yes, I agree that with more tests I would have found the problem, but sometimes you forget things. And to me I want the tests to fail by default or for cases that are unspecified.

I think the sentinel solution would come a long way of solving both the issue that I reported but still keep the context solution intact.

Out of curiosity, would it be a solution to have the sentinel be a real function?

def _sentinel():
    pass
History
Date User Action Args
2015-05-06 13:54:58magnuscsetrecipients: + magnusc, rhettinger, rbcollins, ezio.melotti, steven.daprano, r.david.murray, michael.foord, serhiy.storchaka
2015-05-06 13:54:58magnuscsetmessageid: <1430920498.84.0.578943655812.issue24134@psf.upfronthosting.co.za>
2015-05-06 13:54:58magnusclinkissue24134 messages
2015-05-06 13:54:58magnusccreate