Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.12] gh-90300: Fix cmdline.rst (GH-116721) #116724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions 13 Doc/using/cmdline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,13 @@ Miscellaneous options

.. option:: -b

Issue a warning when comparing :class:`bytes` or :class:`bytearray` with
:class:`str` or :class:`bytes` with :class:`int`. Issue an error when the
option is given twice (:option:`!-bb`).
Issue a warning when converting :class:`bytes` or :class:`bytearray` to
:class:`str` without specifying encoding or comparing :class:`!bytes` or
:class:`!bytearray` with :class:`!str` or :class:`!bytes` with :class:`int`.
Issue an error when the option is given twice (:option:`!-bb`).

.. versionchanged:: 3.5
Affects comparisons of :class:`bytes` with :class:`int`.
Affects also comparisons of :class:`bytes` with :class:`int`.

.. option:: -B

Expand Down Expand Up @@ -386,6 +387,8 @@ Miscellaneous options
Don't add the :data:`user site-packages directory <site.USER_SITE>` to
:data:`sys.path`.

See also :envvar:`PYTHONNOUSERSITE`.

.. seealso::

:pep:`370` -- Per user site-packages directory
Expand Down Expand Up @@ -517,7 +520,7 @@ Miscellaneous options
asyncio'``. See also :envvar:`PYTHONPROFILEIMPORTTIME`.
* ``-X dev``: enable :ref:`Python Development Mode <devmode>`, introducing
additional runtime checks that are too expensive to be enabled by
default.
default. See also :envvar:`PYTHONDEVMODE`.
* ``-X utf8`` enables the :ref:`Python UTF-8 Mode <utf8-mode>`.
``-X utf8=0`` explicitly disables :ref:`Python UTF-8 Mode <utf8-mode>`
(even when it would otherwise activate automatically).
Expand Down
4 changes: 2 additions & 2 deletions 4 Python/initconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ static const char usage_line[] =
/* Lines sorted by option name; keep in sync with usage_envvars* below */
static const char usage_help[] = "\
Options (and corresponding environment variables):\n\
-b : issue warnings about str(bytes_instance), str(bytearray_instance)\n\
and comparing bytes/bytearray with str. (-bb: issue errors)\n\
-b : issue warnings about converting bytes/bytearray to str and comparing\n\
bytes/bytearray with str or bytes with int. (-bb: issue errors)\n\
-B : don't write .pyc files on import; also PYTHONDONTWRITEBYTECODE=x\n\
-c cmd : program passed in as string (terminates option list)\n\
-d : turn on parser debugging output (for experts only, only works on\n\
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.