Terry J. Reedy added the comment:

Since failed asserts print the failed assert, repeating the assertion in a 
message is useless.
>>> assert 1 <= i
Traceback (most recent call last):
  File "<pyshell#3>", line 1, in <module>
    assert 1 <= i
AssertionError

It is already obvious that i must be >= 1. So I would reject the patch.

> And isn't this too much defensive programming?

Whether stdlib python code should have asserts is a more interesting question. 
I will ask on pydev.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19562>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to