[Python-checkins] cpython: Issue #23732: Mention the new -b semantics in the porting HOWTO.
brett.cannon
python-checkins at python.org
Mon Apr 13 20:37:56 CEST 2015
https://hg.python.org/cpython/rev/53af5f557128
changeset: 95594:53af5f557128
user: Brett Cannon <brett at python.org>
date: Mon Apr 13 14:37:50 2015 -0400
summary:
Issue #23732: Mention the new -b semantics in the porting HOWTO.
files:
Doc/howto/pyporting.rst | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/Doc/howto/pyporting.rst b/Doc/howto/pyporting.rst
--- a/Doc/howto/pyporting.rst
+++ b/Doc/howto/pyporting.rst
@@ -348,10 +348,12 @@
Python 2 or 3 support.
You may also want to use use the ``-bb`` flag with the Python 3 interpreter to
-trigger an exception when you are comparing bytes to strings. Usually it's
-simply ``False``, but if you made a mistake in your separation of text/binary
-data handling you may be accidentally comparing text and binary data. This flag
-will raise an exception when that occurs to help track down such cases.
+trigger an exception when you are comparing bytes to strings or bytes to an int
+(the latter is available starting in Python 3.5). By default type-differing
+ comparisons simply return ``False``, but if you made a mistake in your
+separation of text/binary data handling or indexing on bytes you wouldn't easily
+find the mistake. This flag will raise an exception when these kinds of
+comparisons occur, making the mistake much easier to track down.
And that's mostly it! At this point your code base is compatible with both
Python 2 and 3 simultaneously. Your testing will also be set up so that you
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list