Roundup Robot added the comment:
New changeset bf570ff87c60 by Serhiy Storchaka in branch 'default':
Issue #23776: Removed asserts from pprint.PrettyPrinter constructor.
https://hg.python.org/cpython/rev/bf570ff87c60
--
nosy: +python-dev
___
Python
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: commit review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23776
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
versions: -Python 2.7, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23776
___
___
Serhiy Storchaka added the comment:
Similar issues are issue8361 and issue17840.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23776
___
___
New submission from Serhiy Storchaka:
The assert statement should be used only for checking internal logic, and not
for checking user data. These assertions should be either removed or converted
into explicit raising ValueError.
--
components: Library (Lib)
messages: 239241
nosy:
Changes by Serhiy Storchaka storch...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file38685/pprint_args_check.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23776
Berker Peksag added the comment:
Looks good. Two things:
* I'd apply this only to the default branch. Changing exceptions from
AssertionError to ValueError in bugfix releases may break third party code. I
couldn't find a similar bug report in the tracker, so it's probably not worth
to take