Skip to content

Notes comparing NotImplementedError and NotImplemented have inconsistent linking #129015

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

Closed
nexushoratio opened this issue Jan 19, 2025 · 2 comments
Labels
docs Documentation in the Doc dir

Comments

@nexushoratio
Copy link
Contributor

nexushoratio commented Jan 19, 2025

Documentation

The link to the OtherItem is in different locations in the otherwise similar notes. One with the See OtherItem, the other in the sentence calling out they are different. They should probably be consistent.

I personally think they should be like in constants, with the See OtherItem sentence.

constants.html reads:

Note: NotImplementedError and NotImplemented are not interchangeable, even though they have similar names and purposes. See NotImplementedError for details on when to use it.

exceptions.html reads:

Note: NotImplementedError and NotImplemented are not interchangeable, even though they have similar names and purposes. See NotImplemented for details on when to use it.

``NotImplementedError`` and :data:`!NotImplemented` are not interchangeable,
even though they have similar names and purposes.
See :exc:`NotImplementedError` for details on when to use it.

``NotImplementedError`` and :data:`NotImplemented` are not interchangeable,
even though they have similar names and purposes. See
:data:`!NotImplemented` for details on when to use it.

I don't know RST. Is it simply moving the ! in exceptions from line 340 to line 338?

Linked PRs

@nexushoratio nexushoratio added the docs Documentation in the Doc dir label Jan 19, 2025
@picnixz
Copy link
Member

picnixz commented Jan 31, 2025

I guess it'd be better to have the link when we say "See ..." so yes you just need to move "!". The "!" is a special Sphinx (not reST) markup to suppress a link but keep the semantic usage of the role (data or exc in this case). It can also be used for known broken links (that could be non-broken in the future) while retaining a literal markup.

Would you mind creating a PR for that?

picnixz added a commit that referenced this issue Mar 3, 2025
…plementedError` (#129562)

---------

Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Mar 3, 2025
…`NotImplementedError` (pythonGH-129562)

---------

(cherry picked from commit a85eeb9)

Co-authored-by: Mike Castle <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Mar 3, 2025
…`NotImplementedError` (pythonGH-129562)

---------

(cherry picked from commit a85eeb9)

Co-authored-by: Mike Castle <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
picnixz added a commit that referenced this issue Mar 3, 2025
… `NotImplementedError` (GH-129562) (#130776)

gh-129015: Improve disambiguation between `NotImplemented` and `NotImplementedError` (GH-129562)

---------

(cherry picked from commit a85eeb9)

Co-authored-by: Mike Castle <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
picnixz added a commit that referenced this issue Mar 3, 2025
… `NotImplementedError` (GH-129562) (#130777)

gh-129015: Improve disambiguation between `NotImplemented` and `NotImplementedError` (GH-129562)

---------

(cherry picked from commit a85eeb9)

Co-authored-by: Mike Castle <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
@picnixz
Copy link
Member

picnixz commented Mar 3, 2025

Thank you for the initial work @nexushoratio!

@picnixz picnixz closed this as completed Mar 3, 2025
seehwan pushed a commit to seehwan/cpython that referenced this issue Apr 16, 2025
…`NotImplementedError` (python#129562)

---------

Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
Status: Todo
Development

No branches or pull requests

2 participants