Python 3.6.5 ドキュメント 検索

phrase: max: clip:
target: order:
Results of 1 - 10 of about 99 for except (0.011 sec.)
8. エラーと例外 — Python 3.6.5 ドキュメント 17232
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python チュートリア ... あります。それは 構文エラー (syntax error) と 例外 (exception) です。 8.1. 構文エラー ¶ 構文エラーは構文解析エ ... するかもしれません。実行中に検出されたエラーは 例外 (exception) と呼ばれ、常に致命的とは限りません。これから、 ... input ( "Please enter a number: " )) ... break ... except ValueError : ... print ( "Oops! That was no valid ... ます。 まず、 try 節 (try clause) (キーワード try と except の間の文) が実行されます。 何も例外が発生しなければ ...
https://man.plustar.jp/python/tutorial/errors.html - [similar]
8. 複合文 (compound statement) — Python 3.6.5 ドキュメント 10728
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 言語リファレ ... 1_stmt | try2_stmt try1_stmt ::= "try" ":" suite ("except" [ expression ["as" identifier ]] ":" suite )+ ["e ... try2_stmt ::= "try" ":" suite "finally" ":" suite except 節は一つ以上の例外ハンドラを指定します。 try 節内で ... と、例外ハンドラの検索が開始されます。この検索では、 except 節を逐次、発生した例外に対応するまで調べます。式を ... 伴わない except 節を使うなら、最後に書かなければならず、これは全て ...
https://man.plustar.jp/python/reference/compound_stmts.html - [similar]
10.1. itertools --- 効率的なループ実行のためのイテレータ生成関数 — Python 3.6.5... 8968
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... 0 it = iter ( iterable ) try : total = next ( it ) except StopIteration : return yield total for element in ... rvalue try : self . currvalue = next ( self . it ) except StopIteration : return self . currkey = self . key ... ( start , stop , step )) try : nexti = next ( it ) except StopIteration : # Consume *iterable* up to the *st ... if i == nexti : yield element nexti = next ( it ) except StopIteration : # Consume to *stop*. for i , eleme ...
https://man.plustar.jp/python/library/itertools.html - [similar]
27.5. timeit --- 小さなコード断片の実行時間計測 — Python 3.6.5 ドキュメント 8121
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... ーです。 利用例: t = Timer ( ... ) # outside the try/except try : t . timeit ( ... ) # or t.repeat(...) except ... Exception : t . print_exc () これの標準のトレースバックよ ... ない属性に対してテストするために hasattr() と try / except を使用した場合のコストを比較しています: $ python - ... m timeit 'try:' ' str.__bool__' 'except AttributeError:' ' pass' 100000 loops, best of 3: ...
https://man.plustar.jp/python/library/timeit.html - [similar]
What's New in Python 2.5 — Python 3.6.5 ドキュメント 7938
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » What's New in Pytho ... いハンドリングを行えるようになりました( PEP 341: try/except/finally の一体化 セクション)。これらのどの改善も価 ... して実行する PEP 著と実装 Nick Coghlan. PEP 341: try/except/finally の一体化 ¶ Python 2.5 までは try ステートメ ... われるように出来ましたし、一つあるいはそれより多くの except ブロックのために使うことが出来、それで指定した例外 ... を捕捉出来ました。けれども except ブロックと finally ブロックを同時に組み合わせること ...
https://man.plustar.jp/python/whatsnew/2.5.html - [similar]
19.1.2. email.parser: 電子メールメッセージのパース — Python 3.6.5 ドキュメント 7756
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... icy=policy.compat32 ) ¶ Works like BytesFeedParser except that the input to the feed() method must be a stri ... adersonly=False ) ¶ Similar to the parse() method, except it takes a bytes-like object instead of a file-lik ... icy=policy.compat32 ) ¶ Exactly like BytesParser , except that headersonly defaults to True . バージョン 3.3 ... adersonly=False ) ¶ Similar to the parse() method, except it takes a string object instead of a file-like ob ...
https://man.plustar.jp/python/library/email.parser.html - [similar]
10. 完全な文法仕様 — Python 3.6.5 ドキュメント 7664
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 言語リファレ ... 'else' ':' suite ] try_stmt : ( 'try' ':' suite (( except_clause ':' suite ) + [ 'else' ':' suite ] [ 'final ... expr ] # NB compile.c makes sure that the default except clause is last except_clause : 'except' [ test [ ' ...
https://man.plustar.jp/python/reference/grammar.html - [similar]
urllib パッケージを使ってインターネット上のリソースを取得するには — Python 3.6.... 7482
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python HOWTO » urll ... ) >>> try : urllib . request . urlopen ( req ) ... except urllib . error . URLError as e : ... print ( e . r ... > try : ... urllib . request . urlopen ( req ) ... except urllib . error . HTTPError as e : ... print ( e . ... quest ( someurl ) try : response = urlopen ( req ) except HTTPError as e : print ( 'The server couldn \' t f ... he request.' ) print ( 'Error code: ' , e . code ) except URLError as e : print ( 'We failed to reach a serv ...
https://man.plustar.jp/python/howto/urllib2.html - [similar]
What's New In Python 3.0 — Python 3.6.5 ドキュメント 7482
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » What's New in Pytho ... た。(2.6 では既に None が部分的に制限されていました) except exc , var から except exc as var に変更されました。 ... 上の方に書いてあります。 PEP 3110: 例外処理の変更 . except exc as var 構文が標準となり、 except exc , var はも ... 理され、 強力な新機能が追加されました: PEP 352 : All exceptions must be derived (directly or indirectly) from ... BaseException . This is the root of the exception hierarchy. ...
https://man.plustar.jp/python/whatsnew/3.0.html - [similar]
29.6. contextlib --- with 文コンテキスト用ユーティリティ — Python 3.6.5 ドキュ... 7195
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... ーンアップ処理を確実に実行したりするために、 try ... except ... finally 構文を使用できます。例外を捕捉する目的 ... age.close() が呼ばれます。 contextlib. suppress ( *exceptions ) ¶ 任意の例外リストを受け取り、with ブロック内 ... 以下と等価です: try : os . remove ( 'somefile.tmp' ) except FileNotFoundError : pass try : os . remove ( 'some ... otherfile.tmp' ) except FileNotFoundError : pass このコンテキストマネージャ ...
https://man.plustar.jp/python/library/contextlib.html - [similar]
PREV 1 2 3 4 5 6 7 8 9 10 NEXT