[issue23776] Don't use assert for checking arguments in pprint

2015-03-26 Thread Roundup Robot
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

[issue23776] Don't use assert for checking arguments in pprint

2015-03-26 Thread Serhiy Storchaka
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 ___

[issue23776] Don't use assert for checking arguments in pprint

2015-03-26 Thread Serhiy Storchaka
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 ___ ___

[issue23776] Don't use assert for checking arguments in pprint

2015-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Similar issues are issue8361 and issue17840. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23776 ___ ___

[issue23776] Don't use assert for checking arguments in pprint

2015-03-25 Thread Serhiy Storchaka
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:

[issue23776] Don't use assert for checking arguments in pprint

2015-03-25 Thread Serhiy Storchaka
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

[issue23776] Don't use assert for checking arguments in pprint

2015-03-25 Thread Berker Peksag
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