python / python/cpython

`Py_SETREF` and `Py_NewRef` is not explained in extending new types using a C extension

未關閉
#101,233 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

docs
主要語言
Python
星號
77.2k
分支
36k
PR 合併指標
PR 指標待擷取

描述

Documentation

The documentation for extending new types using a C extension just uses Py_SETREF and Py_NewRef with no extra clarification as to what those functions do. It'd be nicer and more convenient if they were explained on-the-spot instead of having to search for it in the docs. They are also not explained in the previous topic (that explains Py_INCREF and Py_DECREF) and the other topics thereafter.

Linked PRs
  • gh-101234

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從連結的新型別教學中的「提供對資料屬性更細緻的控制」一節開始。解釋 Py_SETREF 和 Py_NewRef 的使用位置,並檢查周圍的參照計數主題是否涵蓋一致;當讀者無需查閱其他地方就能理解這兩個函式時,文件就完成了。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
c
領域
documentation
Issue 類型
文件
難度
1/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
描述清楚
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。