FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-127954: Document `PyObject_DelItemString` by rruuaanng · Pull Request #127986 · python/cpython · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
7 changes: 7 additions & 0 deletions Doc/c-api/object.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,13 @@ Object Protocol
on failure. This is equivalent to the Python statement ``del o[key]``.


.. c:function:: int PyObject_DelItemString(PyObject *o, const char *key)

This is the same as :c:func:`PyObject_DelItem`, but *key* is

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is the canonical1 way to write it (git grep -i "similar to" Doc/c-api for inspiration):

Suggested change
This is the same as :c:func:`PyObject_DelItem`, but *key* is
Similar to :c:func:`PyObject_DelItem`, but *key* is

Footnotes

  1. "This is the same as" is sometimes used, but "Similar to [...], but" is a more common, and also more concise. ↩

specified as a :c:expr:`const char*` UTF-8 encoded bytes string,
Comment thread
Eclips4 marked this conversation as resolved.
rather than a :c:expr:`PyObject*`.


.. c:function:: PyObject* PyObject_Dir(PyObject *o)

This is equivalent to the Python expression ``dir(o)``, returning a (possibly
Expand Down

Back | FazBrowse Home | New Git URL