Skip to content

Conversation

@xzmeng
Copy link
Contributor

@xzmeng xzmeng commented Sep 16, 2023

  • Replace PEP 263 with Encoding declarations to avoid misleading
  • Reorder paragraphs about encoding comment to put Emacs thing behind
  • Mark the link about Python 2 as "For historical interest"

📚 Documentation preview 📚: https://cpython-previews--109501.org.readthedocs.build/

EuroPython 2002. The slides are an excellent overview of the design of Python
2's Unicode features (where the Unicode string type is called ``unicode`` and
literals start with ``u``).
literals start with ``u``). (Notice: Python 2 is no longer supported, just keep it
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better: (Note: Python 2 is no longer supported. We just keep this reference for historic reasons.)


If you don't include such a comment, the default encoding used will be UTF-8 as
already mentioned. See also :pep:`263` for more information.
already mentioned.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the reference to PEP 263, since this explains how it all works.

@bedevere-app
Copy link

bedevere-app bot commented Jan 18, 2024

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

they have no significance to Python but are a convention. Python looks for
``coding: name`` or ``coding=name`` in the comment.
Python looks for patterns such like ``coding: latin-1``, ``coding=latin-1`` or
``-*- coding: latin-1 -*-`` in the comment. See :ref:`encodings` for detailed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
``-*- coding: latin-1 -*-`` in the comment. See :ref:`encodings` for detailed
``-*- coding: latin-1 -*-`` in the comment. See :ref:`encodings` for a detailed

Grammar nit

Comment on lines +536 to +537
literals start with ``u``). (Notice: Python 2 is no longer supported, just keep it
here for historical interest.)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
literals start with ``u``). (Notice: Python 2 is no longer supported, just keep it
here for historical interest.)
literals start with ``u``). (Note: Python 2 is no longer supported.
This reference is preserved for historic reasons.)

A slightly different suggestion to the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changes docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants