[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation
Ezio Melotti added the comment: I think that the general consensus is that changing the value of True and False is not supported, and the result of doing it is undefined, so I think Ned request is reasonable. -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21232 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation
Terry J. Reedy added the comment: If you want to backport, go ahead. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21232 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation
Terry J. Reedy added the comment: In 2.x, 1 is guaranteed to be true, in that sense that if 1: print 'true' is guaranteed to print 'true', while True is not necessarily true. True = 0 if True: print 'yes' So 2.x docs should not be changed. -- nosy: +terry.reedy versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21232 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation
Changes by Terry J. Reedy tjre...@udel.edu: -- assignee: docs@python - terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21232 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation
Roundup Robot added the comment: New changeset 604b74f9a07d by Terry Jan Reedy in branch '3.4': Issue #21232: Replace .splitlines arg '1' with 'keepends=True'. http://hg.python.org/cpython/rev/604b74f9a07d New changeset c82dcad83438 by Terry Jan Reedy in branch 'default': Merge with 3.4. Closes #21232. http://hg.python.org/cpython/rev/c82dcad83438 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21232 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation
Ned Batchelder added the comment: Although the OP was incorrect about 1 being guaranteed to be True, it is still better documentation to use True rather than 1 for a boolean argument. -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21232 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation
Terry J. Reedy added the comment: I believe that there have been discussions on this point and my memory is to leave 1 alone in 2.x docs. I could be mistaken though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21232 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation
Changes by Jayanth Koushik jnkous...@gmail.com: -- assignee: docs@python components: Documentation nosy: docs@python, jayanthkoushik priority: normal severity: normal status: open title: Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation type: enhancement versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21232 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation
New submission from Jayanth Koushik: In the difflib documentation, multiple uses of 'splitlines' use '1' as the 'keepends' argument. In Python 2.x, 1 is not guaranteed to be True and while this is guaranteed in 3.x, it would be much clearer to specify the argument as 'True'. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21232 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com