Author mark.dickinson
Recipients WitcherGeralt, mark.dickinson
Date 2013-08-03.12:07:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
What's wrong with:

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


In any case, you appear to be wanting to use assert to check user input.  That's not its intended use;  instead, it's there for making debugging assertions.  Bear in mind that when running in optimized mode (with python -O), Python won't execute those asserts at all.  (See for more.)

I think this should be rejected.
Date User Action Args
2013-08-03 12:07:10mark.dickinsonsetrecipients: + mark.dickinson, WitcherGeralt
2013-08-03 12:07:10mark.dickinsonsetmessageid: <>
2013-08-03 12:07:10mark.dickinsonlinkissue18642 messages
2013-08-03 12:07:09mark.dickinsoncreate