[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: fdrak

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

2015-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch Added file: http://bugs.python.org/file38685/pprint_args_check.patch ___ Python tracker ___

[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 th

[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 ___ ___ Python-bugs-list mailin

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

2015-03-25 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 tr

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

2015-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

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

2015-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: -Python 2.7, Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri