[issue20340] -bb option does not have different behavior than -b option

Arfrever Frehtes Taifersar Arahesis report at bugs.python.org
Wed Jan 22 03:41:59 CET 2014


New submission from Arfrever Frehtes Taifersar Arahesis:

-bb option does not have different behavior than -b option since Python 3.2.

http://docs.python.org/3.4/using/cmdline.html#cmdoption-b says:
"Issue a warning when comparing str and bytes. Issue an error when the option is given twice (-bb)."

(http://docs.python.org/3.4/howto/pyporting.html#deal-with-the-bytes-string-dichotomy also documents behavior present in Python 3.1.)

$ python3.1 -b -c 'print("" == b""); print("Program still running")'
-c:1: BytesWarning: Comparison between bytes and string
False
Program still running
$ python3.1 -bb -c 'print("" == b""); print("Program still running")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
BytesWarning: Comparison between bytes and string
$ python3.2 -b -c 'print("" == b""); print("Program still running")'
-c:1: BytesWarning: Comparison between bytes and string
False
Program still running
$ python3.2 -bb -c 'print("" == b""); print("Program still running")'
-c:1: BytesWarning: Comparison between bytes and string
False
Program still running
$ python3.3 -b -c 'print("" == b""); print("Program still running")'
-c:1: BytesWarning: Comparison between bytes and string
False
Program still running
$ python3.3 -bb -c 'print("" == b""); print("Program still running")'
-c:1: BytesWarning: Comparison between bytes and string
False
Program still running
$ python3.4 -b -c 'print("" == b""); print("Program still running")'
-c:1: BytesWarning: Comparison between bytes and string
False
Program still running
$ python3.4 -bb -c 'print("" == b""); print("Program still running")'
-c:1: BytesWarning: Comparison between bytes and string
False
Program still running
$

----------
components: Interpreter Core
keywords: 3.2regression
messages: 208736
nosy: Arfrever
priority: normal
severity: normal
status: open
title: -bb option does not have different behavior than -b option
type: behavior
versions: Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20340>
_______________________________________


More information about the Python-bugs-list mailing list