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 WitcherGeralt
Recipients WitcherGeralt, mark.dickinson, r.david.murray
Date 2013-08-03.18:45:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375555509.25.0.525627652174.issue18642@psf.upfronthosting.co.za>
In-reply-to
Content
Mark Dickinson, #1 if dedug (and type check, respectively, as in this example, and 'raise') isn't needed we just need pyo
>> Python won't execute those asserts at all
that is convenient.

if not isinstance(data, basestring):
    raise TypeError(...)

- here we need additionally check debug variable, use wrapper or something.
#2 'assert' is a good breakpoint (sorry, bad english. not sure if this is what I wanted to say) on its own. And to orientate on check & 'raise' we have to mark it somehow.
#3 Well, the code is shorter, obviously.

R. David Murray, yes, maybe confusing, but I can imagine many ways when it is very convenient.
History
Date User Action Args
2013-08-03 18:45:09WitcherGeraltsetrecipients: + WitcherGeralt, mark.dickinson, r.david.murray
2013-08-03 18:45:09WitcherGeraltsetmessageid: <1375555509.25.0.525627652174.issue18642@psf.upfronthosting.co.za>
2013-08-03 18:45:09WitcherGeraltlinkissue18642 messages
2013-08-03 18:45:08WitcherGeraltcreate