pytho****@googl*****
pytho****@googl*****
2012年 4月 20日 (金) 18:51:48 JST
Status: New Owner: ---- New issue 599 by osamu****@gmail*****: c-api/objectのPyObject_IsInstanceの 誤訳 http://code.google.com/p/python-doc-ja/issues/detail?id=599 URL、あるいはファイル名は? http://docs.python.org/c-api/object.html#PyObject_IsInstance どんな問題ですか? 「inst が cls のインスタンスか、 cls のサブクラスのインスタンスの場合に -1 を返し、そうでなければ 0 を返します。」 とありますが、原文が Returns 1 if inst is an instance of the class cls or a subclass of cls, or 0 if not. On error, returns -1 and sets an exception. なので、正しくは下記の翻訳になると思います。 「inst が cls のインスタンスか、 cls のサブクラスのインスタンスの場合に 1 を 返し、そうでなければ 0 を返します。」 nightly版、2.4, 2.5, 2.6も同様の翻訳になっていました。(各バージョンの原文は 確認していません)