-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-109634: Use :samp: role #109635
gh-109634: Use :samp: role #109635
Conversation
1ba968b
to
f24e9ad
Compare
@@ -1012,7 +1012,7 @@ differently depending if the ``Py_BUILD_CORE_MODULE`` macro is defined: | |||
* Use ``Py_IMPORTED_SYMBOL`` otherwise. | |||
|
|||
If the ``Py_BUILD_CORE_BUILTIN`` macro is used by mistake on a C extension | |||
built as a shared library, its ``PyInit_xxx()`` function is not exported, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also use it for -I in: https://docs.python.org/dev/using/configure.html#envvar-CPPFLAGS
Compare with new doc: https://cpython-previews.readthedocs.io/en/latest/using/configure.html#cmdoption-arg-CPPFLAGS
f24e9ad
to
3023c0f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A nice improvement!
A
@@ -88,8 +88,8 @@ startup by the :c:func:`PyConfig_Read` function: see | |||
On some systems, conversion using the file system encoding may fail. In this | |||
case, Python uses the :ref:`surrogateescape encoding error handler | |||
<surrogateescape>`, which means that undecodable bytes are replaced by a | |||
Unicode character U+DCxx on decoding, and these are again translated to the | |||
original byte on encoding. | |||
Unicode character U+DC\ *xx* on decoding, and these are again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did the role not work here? (I think backslash-escaped spaces are a little ugly & we should avoid if possible; but not a blocker)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think that U+DCxx should be rendered with typewriter font.
Doc/reference/lexical_analysis.rst
Outdated
+----------------------+---------------------------------+-------+ | ||
| Escape Sequence | Meaning | Notes | | ||
+======================+=================================+=======+ | ||
| ``\N{name}`` | Character named *name* in the | \(5) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:samp:`\N{\\{name\\}}`
would work. But ungainly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for pointing out that backslash have a special meaning in the :samp:
role. All other occurrences of backslash should be doubled.
In this example it should be :samp:`\\N\\{{name}\\}`
, because curly braces should be outside of the variable part. I am surprised that \
before {
needs to be doubled, but it is how it works.
@@ -125,7 +125,7 @@ and to C extension code as :c:data:`!Py_Py3kWarningFlag`. | |||
|
|||
.. seealso:: | |||
|
|||
The 3xxx series of PEPs, which contains proposals for Python 3.0. | |||
The 3\ *xxx* series of PEPs, which contains proposals for Python 3.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same note on avoiding backslash-escaped spaces if possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice; thanks!
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
(cherry picked from commit 92af0cc) Co-authored-by: Serhiy Storchaka <[email protected]>
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
GH-109776 is a backport of this pull request to the 3.12 branch. |
(cherry picked from commit 92af0cc) Co-authored-by: Serhiy Storchaka <[email protected]>
GH-109778 is a backport of this pull request to the 3.11 branch. |
(cherry picked from commit 92af0cc) Co-authored-by: Jacob Coffee <[email protected]>
📚 Documentation preview 📚: https://cpython-previews--109635.org.readthedocs.build/