gh-109634: Use :samp: role#109635
Conversation
1ba968b to
f24e9ad
Compare
| * 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.
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
| <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.
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.
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.
:samp:`\N{\\{name\\}}` would work. But ungainly.
There was a problem hiding this comment.
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.
| .. 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.
Same note on avoiding backslash-escaped spaces if possible
|
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 <storchaka@gmail.com>
|
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 <storchaka@gmail.com>
|
GH-109778 is a backport of this pull request to the 3.11 branch. |
📚 Documentation preview 📚: https://cpython-previews--109635.org.readthedocs.build/