Al Korgun added the comment:
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.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue18642>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com