Results of 1 - 10 of about 25 for PyLong (0.006 sec.)
- 整数型オブジェクト (integer object) 14961
- 整数型オブジェクト (integer object) すべての整数は任意の長さをもつ "long" 整数として実装されます。 エラーが起きると、ほとんどの PyLong_As* API は (return type)-1 を返しますが、これは数値と見分けが付きません。 見分けを付けるためには PyErr_Oc
...curred() を使ってください。 type PyLongObject 次に属します: Limited API (不透明な構造体として). この PyObject のサブタイプは Python の整数オブジェクトを表します。...PyTypeObject PyLong_Type 次に属します: Stable ABI . この PyTypeObject のインスタンスは Python 整数型を表現します。これは Python レイヤにおける...int と同じオブジェクトです。 int PyLong_Check ( PyObject * p ) 引数が PyLongObject か PyLongObject のサブタイプであるときに真を返します。この関数は常に成功します。... - https://man.mtool.work/python/3.14/c-api/long.html
- C API Stability 12321
- C API Stability 特記のない限り、Python の C API には後方互換性ポリシー PEP 387 が適用されます。 変更の大半はソース互換性を保ちます (通常は新しい API の追加だけを行います)。 既存 API の変更や削除は、非推奨の期間を経た後、または重大な問題を修
...) PyList_Insert() PyList_New() PyList_Reverse() PyList_SetItem() PyList_SetSlice() PyList_Size() PyList_Sort() PyList_Type PyLongObject PyLongRangeIter_Type PyLong_AsDouble() PyLong_AsInt() PyLong_AsInt32() PyLong_AsInt64() PyLong_AsLong() PyLong_AsLon...gAndOverflow() PyLong_AsLongLong() PyLong_AsLongLongAndOverflow() PyLong_AsNativeBytes() PyLong_AsSize_t() PyLong_AsSsize_t() PyLong_AsUInt32()...PyLong_AsUInt64() PyLong_AsUnsignedLong() PyLong_AsUnsignedLongLong() PyLong_AsUnsignedLongLongMask() PyLong_AsUnsignedLongMask() PyLong_AsVoidPtr(... - https://man.mtool.work/python/3.14/c-api/stable.html
- Python 3.18 で削除予定 9116
- Python 3.18 で削除予定 以下の非公開関数は非推奨となり、Python 3.18 で削除予定です: _PyBytes_Join() : PyBytes_Join() を使ってください。 _PyDict_GetItemStringWithError() : PyDict_GetItemStringRef() を使ってください。 _PyDict_Pop() : PyDict_Po
...p() を使ってください。 _PyLong_Sign() : PyLong_GetSign() を使ってください。 _PyLong_FromDigits() と _PyLong_New() : PyLongWriter_Create() を使ってください... - https://man.mtool.work/python/3.14/deprecations/c-api-pending-removal-in-3.18.ht...
- はじめに 8369
- はじめに Python のアプリケーションプログラマー向けインターフェース (API) は、C と C++ のプログラマーに、Python インタープリタへのさまざまなレベルのアクセスを提供します。 C++ からも同様に使えますが、簡潔に Python/C API と呼びます。 Python/C
...処理のことは忘れておきます; もっとよい書き方を後で示します): PyObject * t ; t = PyTuple_New ( 3 ); PyTuple_SetItem ( t , 0 , PyLong_FromLong ( 1L )); PyTuple_SetItem ( t , 1 , PyLong_FromLong ( 2L )); PyTuple_SetItem ( t , 2 , PyUnicode_FromString ( "thr...ee" )); ここで、 PyLong_FromLong() は新しい参照を返し、すぐに PyTuple_SetItem() に盗まれます。参照が盗まれた後もそのオブジェクトを利用したい場合は...ssize_t i , n ; n = PyObject_Length ( target ); if ( n < 0 ) return -1 ; for ( i = 0 ; i < n ; i ++ ) { PyObject * index = PyLong_FromSsize_t ( i ); if ( ! index ) return -1 ; if ( PyObject_SetItem ( target , index , item ) < 0 ) { Py_DECREF ( index );... - https://man.mtool.work/python/3.14/c-api/intro.html
- What's new in Python 3.14 8319
- What's new in Python 3.14 エディタ : Adam Turner と Hugo van Kemenade この記事では Python 3.13 と比較した Python 3.14 の新機能を解説します。Python 3.14 は2025年10月7日にリリースされました。全詳細については 変更履歴 をご覧ください。 参考 PEP
...xtItem() を追加しました。 (Irit Katriel and Erlend Aasland が gh-105201 で貢献しました。) int オブジェクトの符号を取得する PyLong_GetSign() 関数を追加しました。 (Sergey B Kirpichev が gh-116560 で貢献しました。) PyLongObject がそれぞれ正、負、ゼロかどう...かを調べる PyLong_IsPositive() 、 PyLong_IsNegative() 、 PyLong_IsZero() を追加しました。 (James Roy and Sergey B Kirpichev が gh-126061 で貢...献しました。) C の <stdint.h> の数値と Python の int オブジェクトを相互に変換する新しい関数を追加しました。 PyLong_AsInt32() PyLong_AsInt64() PyLong_AsUInt32() PyLong_AsUInt64() PyLong_FromInt32() PyLong_FromInt64() PyLong_FromUInt32() P... - https://man.mtool.work/python/3.14/whatsnew/3.14.html
- 1. Extending Python with C or C++ 8285
- 1. Extending Python with C or C++ It is quite easy to add new built-in modules to Python, if you know how to program in C. Such extension modules can do two things that can't be done directly in Python: they can implement new built-in objec
...r * command ; int sts ; if ( ! PyArg_ParseTuple ( args , "s" , & command )) return NULL ; sts = system ( command ); return PyLong_FromLong ( sts ); } There is a straightforward translation from the argument list in Python (for example, the single expre...しているコードは、 PyErr_NoMemory() を呼び出して、失敗を示す値を返さねばなりません。オブジェクトを生成する全ての関数 (例えば PyLong_FromLong() ) は PyErr_NoMemory() の呼び出しを済ませてしまうので、この規則が関係するのは直接 malloc() を呼び出すコードだけで...sts = system ( command ); if ( sts < 0 ) { PyErr_SetString ( SpamError , "System command failed" ); return NULL ; } return PyLong_FromLong ( sts ); } 1.3. Back to the Example Going back to our example function, you should now be able to understand this... - https://man.mtool.work/python/3.14/extending/extending.html
- 非推奨 8020
- 非推奨 Python 3.15 で削除予定 インポートシステム: Setting __cached__ on a module while failing to set __spec__.cached is deprecated. In Python 3.15, __cached__ will cease to be set or take into consideration by the import system or standard
...t_GetItemStringWithError() : PyDict_GetItemStringRef() を使ってください。 _PyDict_Pop() : PyDict_Pop() を使ってください。 _PyLong_Sign() : PyLong_GetSign() を使ってください。 _PyLong_FromDigits() と _PyLong_New() : PyLongWriter_Create() を使ってください... - https://man.mtool.work/python/3.14/deprecations/
- What's New In Python 3.13 7970
- What's New In Python 3.13 エディタ : Adam Turner と Thomas Wouters この記事では Python 3.12 と比較した Python 3.13 の新機能を解説します。Python 3.13 は2024年10月7日にリリースされました。全詳細については 変更履歴 をご覧ください。 参考 PEP 71
...ear() に対応する PyList_Extend() 関数と PyList_Clear() 関数が追加されました。 (Victor Stinner による gh-111138 での貢献。) PyLong_AsInt() 関数が追加されました。 PyLong_AsLong() と似た動作をしますが、結果を C の long ではなく int に格納します。 (Victor...Stinner による gh-108014 での貢献。) ネイティブの整数型と Python の int オブジェクトを簡単に相互変換するための PyLong_AsNativeBytes() 、 PyLong_FromNativeBytes() 、 PyLong_FromUnsignedNativeBytes() 関数が追加されました。 (Steve Dower による...t_GetItemStringWithError() : PyDict_GetItemStringRef() を使ってください。 _PyDict_Pop() : PyDict_Pop() を使ってください。 _PyLong_Sign() : PyLong_GetSign() を使ってください。 _PyLong_FromDigits() と _PyLong_New() : PyLongWriter_Create() を使ってください... - https://man.mtool.work/python/3.14/whatsnew/3.13.html
- 1. 他のアプリケーションへの Python の埋め込み 7920
- 1. 他のアプリケーションへの Python の埋め込み 前章では、 Python を拡張する方法、すなわち C 関数のライブラリを Python に結びつけて機能を拡張する方法について述べました。同じようなことを別の方法でも実行できます: それは、自分の C/C++ アプリケー
...( pFunc && PyCallable_Check ( pFunc )) { pArgs = PyTuple_New ( argc - 3 ); for ( i = 0 ; i < argc - 3 ; ++ i ) { pValue = PyLong_FromLong ( atoi ( argv [ i + 3 ])); if ( ! pValue ) { Py_DECREF ( pArgs ); Py_DECREF ( pModule ); fprintf ( stderr , "Cann...= PyObject_CallObject ( pFunc , pArgs ); Py_DECREF ( pArgs ); if ( pValue != NULL ) { printf ( "Result of call: %ld \n " , PyLong_AsLong ( pValue )); Py_DECREF ( pValue ); } else { Py_DECREF ( pFunc ); Py_DECREF ( pModule ); PyErr_Print (); fprintf ( s...* emb_numargs ( PyObject * self , PyObject * args ) { if ( ! PyArg_ParseTuple ( args , ":numargs" )) return NULL ; return PyLong_FromLong ( numargs ); } static PyMethodDef emb_module_methods [] = { { "numargs" , emb_numargs , METH_VARARGS , "プロセスが... - https://man.mtool.work/python/3.14/extending/embedding.html
- Python support for the Linux perf profiler 7887
- Python support for the Linux perf profiler author : Pablo Galindo The Linux perf profiler is a very powerful tool that allows you to profile and obtain information about the performance of your application. perf also has a very vibrant ecos
...| PyObject_Vectorcall | | | _PyEval_Vector | | | | | | | |--51.67%--_PyEval_EvalFrameDefault | | | | | | | | | |--11.52%--_PyLong_Add | | | | | | | | | | | |--2.97%--_PyObject_Malloc ... このように、Python 関数は出力に現れず、Python バイトコードを評価す...PyEval_Vector | | | py::foo:/src/script.py | | | | | | | |--51.81%--_PyEval_EvalFrameDefault | | | | | | | | | |--13.77%--_PyLong_Add | | | | | | | | | | | |--3.26%--_PyObject_Malloc perf プロファイリングサポートを有効にする方法 perf プロファイリングサ... - https://man.mtool.work/python/3.14/howto/perf_profiling.html