Results of 1 - 10 of about 35 for byte (0.007 sec.)
- ctypes --- Python 用の外部関数ライブラリ 12427
- ctypes --- Python 用の外部関数ライブラリ ソースコード: Lib/ctypes ctypes は Python 用の外部関数ライブラリです。 C と互換性のあるデータ型を提供し、DLL や共有ライブラリの関数を呼び出せます。 これらのライブラリを純粋な Python でラップするために
...のある基本データ型をいくつも定義しています: ctypes の型 C の型 Python の型 _type_ c_bool _Bool bool '?' c_char char 1 文字の bytes 'c' c_wchar wchar_t 1 文字の str 'u' c_byte char int 'b' c_ubyte unsigned char int 'B' c_short short int 'h' c_ushort uns..._t int * c_float float float 'f' c_double double float 'd' c_longdouble long double float 'g' * c_char_p char * (NUL 終端) bytes または None 'z' c_wchar_p wchar_t * (NUL 終端) str または None 'Z' c_void_p void * int または None 'P' py_object PyObject...hr ( b "abcdef" , b "def" ) Traceback (most recent call last): ctypes.ArgumentError : argument 2: TypeError: one character bytes, bytearray or integer expected >>> print ( strchr ( b "abcdef" , b "x" )) None >>> strchr ( b "abcdef" , b "d" ) b'def' >... - https://man.mtool.work/python/3.14/library/ctypes.html
- 浮動小数点オブジェクト 11648
- 浮動小数点オブジェクト type PyFloatObject この PyObject のサブタイプは Python の浮動小数点オブジェクトを表します。 PyTypeObject PyFloat_Type 次に属します: Stable ABI . この PyTypeObject のインスタンスは Python の浮動小数点型を表します。 Pyt
...アンパック関数 The pack and unpack functions provide an efficient platform-independent way to store floating-point values as byte strings. The Pack routines produce a bytes string from a C double , and the Unpack routines produce a C double from such a...bytes string. The suffix (2, 4 or 8) specifies the number of bytes in the bytes string. On platforms that appear to use IEEE 75...4 formats these functions work by copying bits. On other platforms, the 2-byte format is identical to the IEEE 754 binary16 half-precision format, the 4-byte format (32-bit) is identical to the IEEE 75... - https://man.mtool.work/python/3.14/c-api/float.html
- pty --- 擬似端末ユーティリティ 11377
- pty --- 擬似端末ユーティリティ ソースコード: Lib/pty.py pty モジュールは、別のプロセスを起動してその制御端末をプログラムから読み書きする、擬似端末の操作を定義します。 利用可能な環境 : Unix. 擬似端末の扱いはプラットフォームに大きく依存します
...tions master_read and stdin_read are passed a file descriptor which they should read from, and they should always return a byte string. In order to force spawn to return before the child process exits an empty byte array should be returned to signal...記述子が渡されます。 stdin_read には、親プロセスの標準入力を読み込むためにファイル記述子 0 が渡されます。 Returning an empty byte string from either callback is interpreted as an end-of-file (EOF) condition, and that callback will not be called after t... - https://man.mtool.work/python/3.14/library/pty.html
- mmap --- メモリマップファイルのサポート 10597
- mmap --- メモリマップファイルのサポート 利用可能な環境 : not WASI. このモジュールは WebAssembly では動作しないか、利用不可です。詳しくは、 WebAssembly プラットフォーム を見てください。 Memory-mapped file objects behave like both bytearray a
...nd like file objects . You can use mmap objects in most places where bytearray are expected; for example, you can use the re module to search through a memory-mapped file. You can also change a si...ngle byte by doing obj[index] = 97 , or change a subsequence by assigning to a slice: obj[i1:i2] = b'...' . You can also read and wr...class mmap. mmap ( fileno , length , tagname = None , access = ACCESS_DEFAULT , offset = 0 ) (Windows version) Maps length bytes from the file specified by the file handle fileno , and creates a mmap object. If length is larger than the current size... - https://man.mtool.work/python/3.14/library/mmap.html
- コードオブジェクト 10327
- コードオブジェクト コードオブジェクト(Code objects)は CPython 実装の低レベルな詳細部分です。各オブジェクトは関数に束縛されていない実行可能コードの塊を表現しています。 type PyCodeObject コードオブジェクトを表現するために利用されるC構造体。こ
...クトを返します。 このコードオブジェクトを実行すると Exception を送出します。 int PyCode_Addr2Line ( PyCodeObject * co , int byte_offset ) Return the line number of the instruction that occurs on or before byte_offset and ends after it. This may be O(N...just need the line number of a frame, use PyFrame_GetLineNumber() instead. int PyCode_Addr2Location ( PyObject * co , int byte_offset , int * start_line , int * start_column , int * end_line , int * end_column ) 渡された int ポインタの参照先に、 byt...GetCode ( PyCodeObject * co ) Python コード getattr(co, 'co_code') と同等です。 コードオブジェクト内のバイトコードを表す PyBytesObject への強参照を返します。 エラーの場合は例外を送出し、 NULL を返します。 この PyBytesObject は、インタープリタが必要に... - https://man.mtool.work/python/3.14/c-api/code.html
- codecs --- codec レジストリと基底クラス 10327
- codecs --- codec レジストリと基底クラス ソースコード: Lib/codecs.py このモジュールは、標準的な Python codec (エンコーダとデコーダ) 用の基底クラスを定義し、codec とエラー処理検索プロセスを管理する内部の Python codec レジストリへのアクセスを提
...います。カスタムの codec は任意の型間でエンコードとデコードを行えますが、一部のモジュール機能は テキストエンコーディング か bytes へのエンコードのみに制限されています。 このモジュールでは、任意の codec でエンコードやデコードを行うための、以下の関数が定...= 'strict' , ** kwargs ) インクリメンタル・デコーダを使って、 iterator から得られる入力を順にデコードします。 iterator は bytes オブジェクトを yield する必要があります。 この関数は ジェネレーター です。 errors 引数とその他のキーワード引数は、インクリ...メンタル・デコーダにそのまま渡されます。 この関数では、コーデックはデコードする bytes オブジェクトを受け付ける必要があります。 従って、 rot_13 のようなテキストからテキストへのエンコーダはサポートしませんが、... - https://man.mtool.work/python/3.14/library/codecs.html
- スレッドセーフ性の保証 9547
- スレッドセーフ性の保証 このページでは、Python のフリースレッドビルドにおける組み込み型のスレッドセーフ性の保証を説明します。 ここで説明する保証は、 GIL を無効にして Python を使う場合 (フリースレッドモード) に適用されます。 GIL が有効な場合、
...スタンスを共有する場合は、外部での同期を検討してください。 詳細については、 Python のフリースレッド対応 を参照してください。 bytearray オブジェクトのスレッドセーフ性 len() 関数はロックフリーで、 アトミック です。 結合と比較はバッファプロトコルを使います...、オブジェクトごとのロックを保持します。 単一の要素やスライスの読み取りは、複数のスレッドから安全に実行できます。 ba [ i ] # bytearray.__getitem__ ba [ i : j ] # スライス 次の操作は複数のスレッドから安全に実行でき、バイト配列を破損させません。 ba [ i ]...x ) # 最初に現れた値を削除する ba . reverse () # その場で順序を反転する ba . clear () # すべてのバイトを削除する values が bytearray の場合、スライスへの代入は両方のオブジェクトをロックします。 ba [ i : j ] = other_bytearray # 両方をロックする 次の操... - https://man.mtool.work/python/3.14/builtins/threadsafety.html
- Pythonモジュール索引 8752
- Pythonモジュール索引 _ | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | z _ __future__ Future statement definitions __main__ The environment where top-level code is run. Covers command-line i
...stract base classes for containers colorsys Conversion functions between RGB and other color systems. compileall Tools for byte-compiling all Python source files in a directory tree. compression compression.zstd Low-level interface to compression and...l Decimal Arithmetic Specification. difflib Helpers for computing differences between objects. dis Disassembler for Python bytecode. distutils 非推奨: Removed in 3.12. doctest Test pieces of code within docstrings. e email Package supporting the pars...lbox Manipulate mailboxes in various formats mailcap 非推奨: Removed in 3.13. marshal Convert Python objects to streams of bytes and back (with different constraints). math Mathematical functions (sin() etc.). mimetypes Mapping of filename extensions... - https://man.mtool.work/python/3.14/py-modindex.html
- Unicode HOWTO 8226
- Unicode HOWTO Release : 1.12 この HOWTO 文書は、文字データの表現のための Unicode 仕様の Python におけるサポートについて論じ、さらに Unicode を使おうというときによく出喰わす多くの問題について説明します。 Unicode 入門 定義 今日のプログラムは広
...0394' >>> " \u0394 " # 16 ビットの 16 進数を使う '\u0394' >>> " \U00000394 " # 32 ビットの 16 進数を使う '\u0394' 加えて、 bytes クラスの decode() メソッドを使って文字列を作ることもできます。このメソッドは UTF-8 のような値を encoding 引数に取り、オプ...bc' . decode ( "utf-8" , "strict" ) Traceback (most recent call last): ... UnicodeDecodeError : 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte >>> b ' \x80 abc' . decode ( "utf-8" , "replace" ) '\ufffdabc' >>> b ' \x80 abc' ....e 文字列を引数にとり、コードポイント値を返します: >>> chr ( 57344 ) '\ue000' >>> ord ( ' \ue000 ' ) 57344 バイト列への変換 bytes.decode() とは処理が逆向きのメソッドが str.encode() です。このメソッドは、 Unicode 文字列を指定された encoding でエンコード... - https://man.mtool.work/python/3.14/howto/unicode.html
- Unicode オブジェクトと codec 7956
- Unicode オブジェクトと codec Unicode オブジェクト Python 3.3 で PEP 393 が実装されて以来、Unicode オブジェクトは内部で複数の表現形式を使っています。 これにより、メモリ効率を維持しながら Unicode 文字の全範囲を扱えます。 すべてのコードポイント
...表現形式の Unicode オブジェクトでなければなりません (ただしチェックはしません)。 Added in version 3.3. Py_UCS1 * PyUnicode_1BYTE_DATA ( PyObject * unicode ) Py_UCS2 * PyUnicode_2BYTE_DATA ( PyObject * unicode ) Py_UCS4 * PyUnicode_4BYTE_DATA ( PyObjec...っているかどうかのチェックはしません; PyUnicode_KIND() を使って正しい関数を選んでください。 Added in version 3.3. PyUnicode_1BYTE_KIND PyUnicode_2BYTE_KIND PyUnicode_4BYTE_KIND PyUnicode_KIND() マクロの返り値です。 Added in version 3.3. バージョン 3.12...AndData ( int kind , const void * buffer , Py_ssize_t size ) 戻り値: 新しい参照。 与えられた kind (取り得る値は PyUnicode_1BYTE_KIND などの PyUnicode_KIND() が返す値です) の Unicode オブジェクトを生成します。 buffer は、与えられた kind に従って1文字あ... - https://man.mtool.work/python/3.14/c-api/unicode.html