diff -r 0d4e0a736688 Doc/using/cmdline.rst --- a/Doc/using/cmdline.rst Tue Jan 10 11:27:07 2017 +0800 +++ b/Doc/using/cmdline.rst Wed Jan 11 13:01:44 2017 -0800 @@ -24,7 +24,7 @@ When invoking Python, you may specify any of these options:: - python [-BdEiOQsRStuUvVWxX3?] [-c command | -m module-name | script | - ] [args] + python [-bBdEiOQsRStuUvVWxX3?] [-c command | -m module-name | script | - ] [args] The most common use case is, of course, a simple invocation of a script:: @@ -191,6 +191,14 @@ Miscellaneous options ~~~~~~~~~~~~~~~~~~~~~ +.. cmdoption:: -b + + Issue a warning when comparing :class:`bytes` with :class:`bytearray`. + Issue an error when the option is given twice (:option:`!-bb`). + + .. versionchanged:: 3.5 + Affects comparisons of :class:`bytes` with :class:`int`. + .. cmdoption:: -B If given, Python won't try to write ``.pyc`` or ``.pyo`` files on the diff -r 0d4e0a736688 Modules/main.c --- a/Modules/main.c Tue Jan 10 11:27:07 2017 +0800 +++ b/Modules/main.c Wed Jan 11 13:01:44 2017 -0800 @@ -62,6 +62,8 @@ /* Long usage message, split into parts < 512 bytes */ static char *usage_1 = "\ Options and arguments (and corresponding environment variables):\n\ +-b : issue warnings about comparing bytearray with unicode\n\ + (-bb: issue errors)\n\ -B : don't write .py[co] files on import; also PYTHONDONTWRITEBYTECODE=x\n\ -c cmd : program passed in as string (terminates option list)\n\ -d : debug output from parser; also PYTHONDEBUG=x\n\