per page, with , order by , clip by
Results of 1 - 10 of about 250 for else (0.009 sec.)
4. その他の制御フローツール — Python 3.14.8 ドキュメント 9396
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python チュートリアル » 4. その他の制御フローツール テーマ 自動 ライト ダーク | 4. その他の制御フローツール ¶ 前章で紹介した while 文の他にも、 Python にはいくつ ... . print ( 'Negative changed to zero' ) ... elif x == 0 : ... print ( 'Zero' ) ... elif x == 1 : ... print ( 'Single' ) ... else : ... print ( 'More' ) ... More ゼロ個以上の elif 部を使うことができ、 else 部を付けることもできます。キーワード ' elif ' ... は 'else if' を短くしたもので、過剰なインデントを避けるのに役立ちます。一連の if ... elif ... elif ... は、他の言語における switch ... 偶数 4 を見つけた 奇数 5 を見つけた 偶数 6 を見つけた 奇数 7 を見つけた 偶数 8 を見つけた 奇数 9 を見つけた 4.5. ループの else 節 ¶ for または while ループ中の break 文は else 節と対になる場合があります。 break を実行せずにループが終了すると、 else ...
https://man.mtool.work/python/3.14/tutorial/controlflow.html
4. その他の制御フローツール — Python 3.14.8 ドキュメント 9396
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python チュートリアル » 4. その他の制御フローツール テーマ 自動 ライト ダーク | 4. その他の制御フローツール ¶ 前章で紹介した while 文の他にも、 Python にはいくつ ... . print ( 'Negative changed to zero' ) ... elif x == 0 : ... print ( 'Zero' ) ... elif x == 1 : ... print ( 'Single' ) ... else : ... print ( 'More' ) ... More ゼロ個以上の elif 部を使うことができ、 else 部を付けることもできます。キーワード ' elif ' ... は 'else if' を短くしたもので、過剰なインデントを避けるのに役立ちます。一連の if ... elif ... elif ... は、他の言語における switch ... 偶数 4 を見つけた 奇数 5 を見つけた 偶数 6 を見つけた 奇数 7 を見つけた 偶数 8 を見つけた 奇数 9 を見つけた 4.5. ループの else 節 ¶ for または while ループ中の break 文は else 節と対になる場合があります。 break を実行せずにループが終了すると、 else ...
https://man.mtool.work/python/3.14/tutorial/controlflow.html
8. 複合文 (compound statement) — Python 3.14.8 ドキュメント 9276
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 8. 複合文 (compound statement) テーマ 自動 ライト ダーク | 8. 複合文 (compound statement) ¶ 複合文には、他の文 (のグループ) が入ります; ... ッダに続く行で一つ多くインデントされた文の集まりです。後者の形式のスイートに限り、さらに複合文をネストできます; 以下の文は、 else 節がどちらの if 節に属するかがはっきりしないなどの理由から不正になります: if test1 : if test2 : print ( x ) また、このコン ... 、オプションの継続節は必ず、文を開始できない予約語で始まるので、曖昧さは存在しません。 (Python では、 'ぶら下がり (dangling) else ' 問題は、ネストされた if 文をインデントさせることで解決されます)。 以下の節における文法規則の記述方式は、明確さのために、 ... 岐を実行するために使われます: if_stmt : "if" assignment_expression ":" suite ( "elif" assignment_expression ":" suite )* [ "else" ":" suite ] if 文は、式を一つ一つ評価してゆき、真になるまで続けて、真になった節のスイートだけを選択します (真: true と偽: ...
https://man.mtool.work/python/3.14/reference/compound_stmts.html
8. 複合文 (compound statement) — Python 3.14.8 ドキュメント 9276
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 8. 複合文 (compound statement) テーマ 自動 ライト ダーク | 8. 複合文 (compound statement) ¶ 複合文には、他の文 (のグループ) が入ります; ... ッダに続く行で一つ多くインデントされた文の集まりです。後者の形式のスイートに限り、さらに複合文をネストできます; 以下の文は、 else 節がどちらの if 節に属するかがはっきりしないなどの理由から不正になります: if test1 : if test2 : print ( x ) また、このコン ... 、オプションの継続節は必ず、文を開始できない予約語で始まるので、曖昧さは存在しません。 (Python では、 'ぶら下がり (dangling) else ' 問題は、ネストされた if 文をインデントさせることで解決されます)。 以下の節における文法規則の記述方式は、明確さのために、 ... 岐を実行するために使われます: if_stmt : "if" assignment_expression ":" suite ( "elif" assignment_expression ":" suite )* [ "else" ":" suite ] if 文は、式を一つ一つ評価してゆき、真になるまで続けて、真になった節のスイートだけを選択します (真: true と偽: ...
https://man.mtool.work/python/3.14/reference/compound_stmts.html
itertools --- 効率的なループ用のイテレータ生成関数群 — Python 3.14.8 ドキュメン... 9155
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 関数型プログラミング用モジュール » itertools --- 効率的なループ用のイテレータ生成関数群 テーマ 自動 ライト ダーク | itertools --- 効 ... tuple ( pool [ i ] for i in indices ) while True : for i in reversed ( range ( r )): if indices [ i ] != i + n - r : break else : return indices [ i ] += 1 for j in range ( i + 1 , r ): indices [ j ] = indices [ j - 1 ] + 1 yield tuple ( pool [ i ] f ... eld tuple ( pool [ i ] for i in indices ) while True : for i in reversed ( range ( r )): if indices [ i ] != n - 1 : break else : return indices [ i :] = [ indices [ i ] + 1 ] * ( r - i ) yield tuple ( pool [ i ] for i in indices ) Added in version 3 ... B')] → A B C D A B # [list(g) for k, g in groupby('AAAABBBCCD')] → AAAA BBB CC D keyfunc = ( lambda x : x ) if key is None else key iterator = iter ( iterable ) exhausted = False def _grouper ( target_key ): nonlocal curr_value , curr_key , exhausted ...
https://man.mtool.work/python/3.14/library/itertools.html
itertools --- 効率的なループ用のイテレータ生成関数群 — Python 3.14.8 ドキュメン... 9035
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 関数型プログラミング用モジュール » itertools --- 効率的なループ用のイテレータ生成関数群 テーマ 自動 ライト ダーク | itertools --- 効 ... tuple ( pool [ i ] for i in indices ) while True : for i in reversed ( range ( r )): if indices [ i ] != i + n - r : break else : return indices [ i ] += 1 for j in range ( i + 1 , r ): indices [ j ] = indices [ j - 1 ] + 1 yield tuple ( pool [ i ] f ... eld tuple ( pool [ i ] for i in indices ) while True : for i in reversed ( range ( r )): if indices [ i ] != n - 1 : break else : return indices [ i :] = [ indices [ i ] + 1 ] * ( r - i ) yield tuple ( pool [ i ] for i in indices ) Added in version 3 ... B')] → A B C D A B # [list(g) for k, g in groupby('AAAABBBCCD')] → AAAA BBB CC D keyfunc = ( lambda x : x ) if key is None else key iterator = iter ( iterable ) exhausted = False def _grouper ( target_key ): nonlocal curr_value , curr_key , exhausted ...
https://man.mtool.work/python/3.14/library/itertools.html
10. 完全な文法仕様 — Python 3.14.8 ドキュメント 8564
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 10. 完全な文法仕様 テーマ 自動 ライト ダーク | 10. 完全な文法仕様 ¶ 以下に示すのは Python の完全な文法です。CPython のパーサを生成するた ... NEWLINE # Not needed, there for speedup | ';' . simple_stmt + [ ';' ] NEWLINE # NOTE: assignment MUST precede expression, else parsing a simple assignment # will throw a SyntaxError. simple_stmt : | assignment | type_alias | star_expressions | retur ... lt # If statement # ------------ if_stmt : | 'if' named_expression ':' block elif_stmt | 'if' named_expression ':' block [ else_block ] elif_stmt : | 'elif' named_expression ':' block elif_stmt | 'elif' named_expression ':' block [ else_block ] else_ ... block : | 'else' ':' block # While statement # --------------- while_stmt : | 'while' named_expression ':' block [ else_block ] # For stat ...
https://man.mtool.work/python/3.14/reference/grammar.html
timer file descriptor HOWTO — Python 3.14.8 ドキュメント 8564
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » timer file descriptor HOWTO テーマ 自動 ライト ダーク | timer file descriptor HOWTO ¶ リリース : 1.13 This HOWTO discusses Python's support for th ... ception for safety. cmd = data . decode () if cmd . startswith ( "stop" ): print ( f "Stopping server" ) is_active = False else : print ( f "Unknown command: { cmd } " ) else : # No more data, close connection print ( f "Closing connection { fd } " ) ... os . read ( fd , 8 ), byteorder = sys . byteorder ) print ( f "Timer { fds . index ( fd ) + 1 } expired { count } times" ) else : print ( f "Unknown file descriptor { fd } " ) finally : for fd in fds : ep . unregister ( fd ) os . close ( fd ) ep . cl ... ception for safety. cmd = data . decode () if cmd . startswith ( "stop" ): print ( f "Stopping server" ) is_active = False else : print ( f "Unknown command: { cmd } " ) else : # No more data, close connection print ( f "Closing connection { fd } " ) ...
https://man.mtool.work/python/3.14/howto/timerfd.html
10. 完全な文法仕様 — Python 3.14.8 ドキュメント 8564
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 10. 完全な文法仕様 テーマ 自動 ライト ダーク | 10. 完全な文法仕様 ¶ 以下に示すのは Python の完全な文法です。CPython のパーサを生成するた ... NEWLINE # Not needed, there for speedup | ';' . simple_stmt + [ ';' ] NEWLINE # NOTE: assignment MUST precede expression, else parsing a simple assignment # will throw a SyntaxError. simple_stmt : | assignment | type_alias | star_expressions | retur ... lt # If statement # ------------ if_stmt : | 'if' named_expression ':' block elif_stmt | 'if' named_expression ':' block [ else_block ] elif_stmt : | 'elif' named_expression ':' block elif_stmt | 'elif' named_expression ':' block [ else_block ] else_ ... block : | 'else' ':' block # While statement # --------------- while_stmt : | 'while' named_expression ':' block [ else_block ] # For stat ...
https://man.mtool.work/python/3.14/reference/grammar.html
timer file descriptor HOWTO — Python 3.14.8 ドキュメント 7972
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » timer file descriptor HOWTO テーマ 自動 ライト ダーク | timer file descriptor HOWTO ¶ リリース : 1.13 This HOWTO discusses Python's support for th ... ception for safety. cmd = data . decode () if cmd . startswith ( "stop" ): print ( f "Stopping server" ) is_active = False else : print ( f "Unknown command: { cmd } " ) else : # No more data, close connection print ( f "Closing connection { fd } " ) ... os . read ( fd , 8 ), byteorder = sys . byteorder ) print ( f "Timer { fds . index ( fd ) + 1 } expired { count } times" ) else : print ( f "Unknown file descriptor { fd } " ) finally : for fd in fds : ep . unregister ( fd ) os . close ( fd ) ep . cl ... ception for safety. cmd = data . decode () if cmd . startswith ( "stop" ): print ( f "Stopping server" ) is_active = False else : print ( f "Unknown command: { cmd } " ) else : # No more data, close connection print ( f "Closing connection { fd } " ) ...
https://man.mtool.work/python/3.14/howto/timerfd.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT