msg265686 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2016-05-16 08:33 |
When there is a reference from the term in different form (e.g. in plural), the modified part can be appended outside of the reference: ":term:`bytes-like object`\ s". But this looks not very nice in rendered document, since only a part of the word is undescored. Proposed patch expands similar references to full words: ":term:`bytes-like objects `". |
|
|
msg265688 - (view) |
Author: Martin Panter (martin.panter) *  |
Date: 2016-05-16 09:32 |
These bug me too. For the changes like the bytes-like objects example, you have my full support. But for the changes that modify identifier names, I think the both the old and the new versions are pretty bad. Example: - . . . for some :exc:`SyntaxError`\ s. + . . . for some :exc:`SyntaxErrors `. In Firefox, the new version renders as if it is talking about something literally called SyntaxErrors. It is only obvious that the exception is called SyntaxError when you hover the mouse, follow the link, etc. I wonder if it would be better to find another way to write these kind of cases. E.g.: * . . . for some syntax errors. [Just drop the link and markup.] * . . . for some :exc:`SyntaxError` exceptions. For cases like “eval()uated”, would it be acceptable changing to “evaluated with :func:`eval` ”? |
|
|
msg265731 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2016-05-16 20:34 |
Thank you for your review Martin! Absolutely agreed with you about references to classes and exceptions. I have removed this from the next version of the patch. I left your idea about ":exc:`SyntaxError` exceptions" for other patch. “evaluated with :func:`eval` ” looks tautologically to me. In hypertext we can avoid the repetition. |
|
|
msg265746 - (view) |
Author: Martin Panter (martin.panter) *  |
Date: 2016-05-17 01:48 |
It _would_ be nice to sort out the SyntaxErrors problem as well, but don’t let that stop fixing the easier problems. I would be interested in other people’s thoughts. My problem with things like :func:`evaluated ` is that the meaning is less clear, and it is not obvious what the hyperlink is for. If you print the sentence out, or casually look in a browser, there is not much indication that the function eval() is specified. Ugly as it is, “eval()uated” is more obvious. Other options that I would be happier with, if you want to avoid the repeated “evaluated with eval()”, etc: Level values are passed through :func:`eval` list of channels waited with select() or poll() The ``args`` entry, after passing through :func:`eval` and :meth:`~Thread.join` cannot be called on them [dummy threads] Module objects now support :mod:`weakref`. |
|
|
msg265759 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2016-05-17 07:13 |
I think you make an accent on wrong thing. All these sentences look correct to me if remove any hyperlinks. Hyperlinks are optional. In the phrase "Level values are evaluated" the reference is to the term "evaluating", not to the eval() function. But since this term is not in glossary and is explained only in eval() description, the reference points to the eval() function. The same is for "weakly referencable" and "joining". It would be more correct ton add explicit labels "evaluating", "weak reference" and "join" and use they in references (":ref:`evaluated `"). This would create links without changing the style of the text. |
|
|
msg265760 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2016-05-17 07:36 |
Georg, is it possible to refer to function without changing a style? Something like :ref:`evaluated func:eval`? |
|
|
msg265767 - (view) |
Author: Georg Brandl (georg.brandl) *  |
Date: 2016-05-17 15:34 |
Not really, no. You have to add a :ref: target label for the function. If it's only a few instances, that should be manageable. |
|
|
msg265824 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2016-05-18 10:55 |
New changeset ef6d3a537cf5 by Serhiy Storchaka in branch '3.5': Issue #27036: Fixed formatting references to "bytes-like object" in plural. https://hg.python.org/cpython/rev/ef6d3a537cf5 New changeset d6b9a4c3f8ef by Serhiy Storchaka in branch 'default': Issue #27036: Fixed formatting references to "bytes-like object" in plural. https://hg.python.org/cpython/rev/d6b9a4c3f8ef |
|
|
msg265826 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2016-05-18 11:14 |
Pushed a part about "bytes-like objects". Here is a patch that adds explicit labels for referencing without changing the style. |
|
|