per page, with , order by , clip by
Results of 1 - 10 of about 13 for anext (0.010 sec.)
asyncio での開発 13038
asyncio での開発 非同期プログラミングは、従来の「逐次的」なプログラミングとは異なります。 このページはよくある間違いや落とし穴を列挙し、それらを回避する方法を説明します。 デバッグモード asyncio はデフォルトで本運用モードで実行されます。いっ ... ield 10 finally : await asyncio . sleep ( 0 ) with asyncio . Runner () as runner : agen = agenfn () print ( runner . run ( anext ( agen ))) del agen 出力: 10 Exception ignored while closing generator < async_generator object agenfn at 0x000002F71CD10D ... sync def agenfn (): try : yield 10 finally : await asyncio . sleep ( 0 ) async def main (): agen = agenfn () print ( await anext ( agen )) del agen asyncio . run ( main ()) 同じジェネレーターのイテレーションとクローズを並行して行わない Async generator ... s may be reentered while another __anext__() / athrow() / aclose() call is in progress. This may lead to an inconsistent state of the async generator and can cause ...
https://man.mtool.work/python/3.14/library/asyncio-dev.html
型オブジェクトの構造体 10874
型オブジェクトの構造体 新しい型を定義する PyTypeObject 構造体は、Python のオブジェクトシステムで特に重要な構造体の 1 つです。 型オブジェクトは PyObject_* 関数や PyType_* 関数で扱えますが、ほとんどの Python アプリケーションにとって関心のある ... に継承されるスロットもあります。 sub-slots Slot 型 特殊メソッド am_await unaryfunc __await__ am_aiter unaryfunc __aiter__ am_anext unaryfunc __anext__ am_send sendfunc nb_add binaryfunc __add__ __radd__ nb_inplace_add binaryfunc __iadd__ nb_subtract bin ... のポインタを保持しています。 以下は構造体の定義です: typedef struct { unaryfunc am_await ; unaryfunc am_aiter ; unaryfunc am_anext ; sendfunc am_send ; } PyAsyncMethods ; unaryfunc PyAsyncMethods . am_await The corresponding slot ID Py_am_await is part ... は以下の通りです: PyObject * am_aiter ( PyObject * self ); 非同期イテレータ オブジェクトを返さなければなりません。 詳細は __anext__() を参照してください。 オブジェクトが非同期反復処理のプロトコルを実装していない場合、このスロットを NULL に設定します。 ...
https://man.mtool.work/python/3.14/c-api/typeobj.html
collections.abc --- コンテナの抽象基底クラス 10874
collections.abc --- コンテナの抽象基底クラス Added in version 3.3: 以前はこのモジュールは collections モジュールの一部でした。 ソースコード: Lib/_collections_abc.py このモジュールは、 抽象基底クラス を提供します。抽象基底クラスは、クラスが特 ... ] __await__ Coroutine [ 1 ] Awaitable send , throw close AsyncIterable [ 1 ] __aiter__ AsyncIterator [ 1 ] AsyncIterable __anext__ __aiter__ AsyncGenerator [ 1 ] AsyncIterator asend , athrow aclose , __aiter__ , __anext__ Buffer [ 1 ] __buffer__ 脚注 ... chronous iterable の定義も参照してください。 Added in version 3.5. class collections.abc. AsyncIterator __aiter__ および __anext__ メソッドを提供するクラスの ABC です。 asynchronous iterator の定義も参照してください。 Added in version 3.5. class colle ...
https://man.mtool.work/python/3.14/library/collections.abc.html
用語集 9554
用語集 >>> 対話型 シェルにおけるデフォルトの Python プロンプトです。インタープリターで対話的に実行されるコード例でよく見られます。 ... 次のものが考えられます: 対話型 ( interactive ) シェルにおいて、インデントされたコードブロック、対応する左 ... す。 asynchronous generator iterator 非同期ジェネレータ関数 が作成するオブジェクトです。 これは asynchronous iterator で、 __anext__() メソッドを使って呼ばれると awaitable オブジェクトを返します。 この awaitable オブジェクトは、次の yield 式まで非同期ジ ... タ関数の本体を実行します。 各 yield は処理を一時的に中断し、実行状態(ローカル変数や保留中の try 文を含む)を記憶します。 __anext__() が返す別の awaitable によって 非同期ジェネレータイテレータ の実行が実際に再開すると、中断した箇所から処理を続けます。 ... s iterator を返さなければなりません。 PEP 492 で導入されました。 asynchronous iterator (非同期イテレータ) __aiter__() と __anext__() メソッドを実装したオブジェクトです。 __anext__() は awaitable オブジェクトを返さなければなりません。 async for は Stop ...
https://man.mtool.work/python/3.14/glossary.html
組み込み関数 8692
組み込み関数 Python インタプリタには数多くの関数と型が組み込まれており、いつでも利用できます。それらをここにアルファベット順に挙げます。 組み込み関数 A abs() aiter() all() anext() any() ascii() B bin() bool() breakpoint() bytearray() bytes( ... 以下のコードと等価です: def all ( iterable ): for element in iterable : if not element : return False return True awaitable anext ( async_iterator , / ) awaitable anext ( async_iterator , default , / ) 待ち受けると、指定した 非同期イテレータ の次の要素 ... る場合は、その値を返します。 これは組み込みの next() 関数の非同期版であり、同じように動作します。 これは async_iterator の __anext__() メソッドを呼び出し、待ち受け可能オブジェクト ( awaitable ) を返します。 これを待ち受けると、イテレータの次の値が返され ...
https://man.mtool.work/python/3.14/builtins/functions.html
8. 複合文 (compound statement) 8692
8. 複合文 (compound statement) 複合文には、他の文 (のグループ) が入ります; 複合文は、中に入っている他の文の実行の制御に何らかのやり方で影響を及ぼします。一般的には、複合文は複数行にまたがって書かれますが、全部の文を一行に連ねた単純な書き方も ... みキーワードとして扱われていました。 8.9.2. async for 文 async_for_stmt : "async" for_stmt asynchronous iterable は、その __anext__ メソッドで非同期なコードを実行可能な、 asynchronous iterator を直接返す __aiter__ メソッドを提供しています。 async for 文 ... E2 は意味論的に以下と等価です: iter = ( ITER ) . __aiter__ () running = True while running : try : TARGET = await iter . __anext__ () except StopAsyncIteration : running = False else : SUITE else : SUITE2 ただし、 __aiter__() と __anext__() には、暗黙 ...
https://man.mtool.work/python/3.14/reference/compound_stmts.html
6. 式 (expression) 8252
6. 式 (expression) この章では、Python の式における個々の要素の意味について解説します。 構文上の注意: この章以降では、 文法の表記法 を字句解析ではなく構文の記述に使います。 構文規則の (選択肢の 1 つの) 形式が次のように記述され、 name : other ... の外部呼び出しであったかのように関数を続行できます。 再開後の yield 式の値は、実行を再開させたメソッドによって決まります。 __anext__() を使った場合は None になります。 asend() を使った場合は、そのメソッドに渡した値になります。 break 、呼び出し元のタスク ... hods of an asynchronous generator iterator, which are used to control the execution of a generator function. async agen. __anext__ ( ) Returns an awaitable which when run starts to execute the asynchronous generator or resumes it at the last executed ... yield expression. When an asynchronous generator function is resumed with an __anext__() method, the current yield expression always evaluates to None in the returned awaitable, which when run will continue ...
https://man.mtool.work/python/3.14/reference/expressions.html
C API Stability 7812
C API Stability 特記のない限り、Python の C API には後方互換性ポリシー PEP 387 が適用されます。 変更の大半はソース互換性を保ちます (通常は新しい API の追加だけを行います)。 既存 API の変更や削除は、非推奨の期間を経た後、または重大な問題を修 ... n improve performance for that Python version, but will limit compatibility. Compiling with Py_LIMITED_API will then yield an extension that can be distributed where a version-specific one is not available – for example, for prereleases of an upcoming ... idden when Py_LIMITED_API is defined, even though they're part of the Limited API. For these reasons, we recommend testing an extension with all minor Python versions it supports, and preferably to build with the lowest such version. また、使用するすべ ... T Py_UCS4 Py_UNBLOCK_THREADS Py_UTF8Mode Py_VaBuildValue() Py_Version Py_XDECREF Py_XINCREF Py_XNewRef() Py_am_aiter Py_am_anext Py_am_await Py_am_send Py_bf_getbuffer Py_bf_releasebuffer Py_buffer Py_intptr_t Py_mod_create Py_mod_exec Py_mod_gil Py_m ...
https://man.mtool.work/python/3.14/c-api/stable.html
dis --- Python バイトコードの逆アセンブラー 7812
dis --- Python バイトコードの逆アセンブラー ソースコード: Lib/dis.py dis モジュールは、CPython の bytecode を逆アセンブルして解析するためのものです。 このモジュールが入力として受け取る CPython のバイトコードは Include/opcode.h で定義され、コ ... in version 3.5. バージョン 3.7 で変更: __aiter__ から awaitable オブジェクトを返すことは、サポートされなくなりました。 GET_ANEXT STACK.append(get_awaitable(STACK[-1].__anext__())) を実行してスタックに追加します。 get_awaitable の詳細は GET_AWAITABLE を ...
https://man.mtool.work/python/3.14/library/dis.html
組み込み例外 7390
組み込み例外 Python において、すべての例外は BaseException から派生したクラスのインスタンスでなければなりません。特定のクラスを言及する except 節を伴う try 文において、その節はそのクラスから派生した例外クラスも処理しますが、そのクラスの派生 ... rror に変換されます。 exception StopAsyncIteration イテレーションを停止するために、 asynchronous iterator オブジェクトの __anext__() メソッドから送出しなければなりません。 Added in version 3.5. exception SyntaxError ( message , details ) パーザが構文エ ...
https://man.mtool.work/python/3.14/builtins/exceptions.html
PREV 1 2 NEXT