[issue18642] enhancement for operator 'assert'

2013-08-03 Thread Al Korgun
Al Korgun added the comment: Mark Dickinson, sorry, didn't answer the first questiuon. >> In your original message, is it your intention that the assert raises >> TypeError, or that it raises AssertionError? I suggest to add the ability to raise relevant (for specific part of

[issue18642] enhancement for operator 'assert'

2013-08-03 Thread Al Korgun
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 Type

[issue18642] enhancement for operator 'assert'

2013-08-03 Thread Al Korgun
Al Korgun added the comment: Mark Dickinson, and I just think it might be useful in debug. PYO is another story. -- ___ Python tracker <http://bugs.python.org/issue18

[issue18642] enhancement for operator 'assert'

2013-08-03 Thread Al Korgun
New submission from Al Korgun: It would be pretty good, if 'assert' could raise specified exception, like that: >>> data = None >>> assert isinstance(data, basestring), TypeError("'data' must be a string") AssertionErrorTypeError: 'data&

[issue16766] small disadvantage of htmlentitydefs

2012-12-24 Thread Al Korgun
Changes by Al Korgun : -- versions: +Python 2.6 ___ Python tracker <http://bugs.python.org/issue16766> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16766] small disadvantage of htmlentitydefs

2012-12-24 Thread Al Korgun
New submission from Al Korgun: >>> import htmlentitydefs >>> htmlentitydefs.name2codepoint.get("quot") # ok 34 >>> htmlentitydefs.name2codepoint.get("apos", "null") # ' -> chr(39) 'null' -- components: L