python / python/cpython

Can the explanation of socket.connect() connection failures be rephrased? I don't think anybody understands what's written.

未關閉
#132,819 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

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

描述

Documentation

The documentation for the socket.connect() method has a tortured sentence that is very hard to understand. It's especially intractable for non-native English speakers. Can it be simplified?

The sentence is this:
If the connection is interrupted by a signal, the method waits until the connection completes, or raise a [TimeoutError](https://docs.python.org/3/library/exceptions.html#TimeoutError) on timeout, if the signal handler doesn’t raise an exception and the socket is blocking or has a timeout.

Can this be rephrased as two simpler sentences? I'm happy to propose that rewrite if somebody could add a comment here explaining what this sentence actually means. thx

Linked PRs
  • gh-155022

貢獻指南

開啟貢獻指南

從這裡開始

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

研究方向

從 socket.connect() 文件條目開始,閱讀周圍關於連線中斷、訊號處理常式、阻塞通訊端、逾時和 TimeoutError 的討論。在提出兩個保留所有這些條件的更簡單句子之前,先確認該句子的含義。只有當解釋準確、對於非英語母語者來說更加清楚,並且已反映在連結的文件中時,才算完成。

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

評估

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

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

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