|
Meta tags:
description=Japanese Translation of the Python Documentation. Contribute to python/python-docs-ja development by creating an account on GitHub.;
Headings (most frequently used words):
navigation, errors, po, file, breadcrumbs, footer, menu, repository, filesexpand, tree, latest, commit, history, metadata, and, controls,
Text of the page (most frequently used words):
the (155), keyword (110), #errors (92), #tutorial (84), msgid (83), msgstr (82), rst (81), exception (81), except (70), try (65), print (47), clause (45), raise (43), and (36), for (36), exc (35), exceptions (35), file (34), finally (28), that (27), not (27), line (27), stdin (23), statement (22), most (22), last (21), class (21), traceback (20), error (20), nameerror (20), are (19), module (17), recent (17), call (17), from (17), python (17), open (15), you (14), example (14), err (14), spam (14), args (14), type (13), github (12), code (12), else (12), runtimeerror (12), hithere (12), can (11), this (11), which (11), with (10), raised (10), return (10), handle (10), inst (10), but (9), has (9), actions (9), typeerror (9), executed (9), more (9), true (9), will (9), may (9), all (9), execution (8), valueerror (8), arg (8), eggs (8), pass (8), allows (7), after (7), its (7), when (7), world (7), zerodivisionerror (7), one (7), break (7), occurs (7), keyboardinterrupt (7), name (7), database (7), message (7), arguments (7), while (7), docs (6), object (6), handled (6), see (6), str (6), result (6), divide (6), division (6), zero (6), 例えば (6), occur (6), another (6), defined (6), classes (6), ref (6), user (6), oserror (6), func (6), have (6), sys (6), int (6), meth (6), __str__ (6), printed (6), syntax (6), security (5), raw (5), executing (5), following (5), define (5), standard (5), was (5), been (5), def (5), continue (5), during (5), must (5), handlers (5), only (5), none (5), handling (5), lines (5), types (5), input (5), time (4), they (4), part (4), failed (4), whether (4), clean (4), useful (4), version (4), about (4), number (4), programs (4), bltin (4), sqlite (4), also (4), unhandled (4), baseexception (4), subclasses (4), this_fails (4), first (4), cls (4), built (4), hello (4), 2025 (4), your (4), support (4), copilot (4), information (3), navigation (3), used (3), files (3), myfile (3), txt (3), look (3), using (3), some (3), such (3), therefore (3), any (3), 765 (3), execute (3), optional (3), their (3), other (3), typically (3), derived (3), chaining (3), connectionerror (3), instance (3), unable (3), occurred (3), than (3), does (3), then (3), common (3), however (3), program (3), base (3), note (3), handler (3), stack (3), where (3), what (3), learn (3), detected (3), place (3), content (3), 2021 (3), copy (3), blame (3), history (3), quality (3), tab (3), window (3), refresh (3), session (3), reload (3), sign (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), build (3), community (2), status (2), footer (2), view (2), way (2), always (2), applications (2), objects (2), simple (2), problem (2), finished (2), 502 (2), end (2), 499 (2), regardless (2), 494 (2), 492 (2), use (2), resource (2), resources (2), 484 (2), two (2), event (2), 479 (2), 452 (2), 450 (2), false (2), bool_return (2), 441 (2), 439 (2), syntaxwarning (2), pep (2), discouraged (2), compiler (2), emits (2), confusing (2), value (2), 431 (2), just (2), 425 (2), 419 (2), again (2), could (2), 415 (2), その例外は (2), 409 (2), before (2), present (2), 403 (2), goodbye (2), 392 (2), under (2), 388 (2), 386 (2), functions (2), own (2), report (2), 379 (2), names (2), 376 (2), allow (2), 372 (2), tut (2), indirectly (2), either (2), directly (2), should (2), 368 (2), 366 (2), 360 (2), 350 (2), 347 (2), above (2), direct (2), cause (2), 325 (2), 323 (2), 320 (2), indicate (2), 317 (2), 299 (2), being (2), inside (2), 295 (2), 293 (2), 例外が通り過ぎました (2), flew (2), 277 (2), form (2), need (2), intend (2), 273 (2), 271 (2), passed (2), indicates (2), 265 (2), 259 (2), 256 (2), raising (2), 254 (2), 実行時エラーを処理 (2), run (2), 240 (2), even (2), called (2), 236 (2), because (2), 231 (2), close (2), len (2), readlines (2), argv (2), 222 (2), clauses (2), 217 (2), strip (2), readline (2), import (2), unexpected (2), integer (2), 203 (2), 199 (2), possible (2), 194 (2), systemexit (2), exit (2), interrupt (2), fatal (2), 186 (2), detail (2), 183 (2), 166 (2), variable (2), specify (2), 160 (2), known (2), 156 (2), 153 (2), 134 (2), match (2), instances (2), listing (2), matches (2), 129 (2), 126 (2), same (2), different (2), 120 (2), named (2), 116 (2), rest (2), skipped (2), 111 (2), 108 (2), keywords (2), 105 (2), 103 (2), valid (2), kbd (2), control (2), until (2), context (2), source (2), concatenate (2), messages (2), syntaxerror (2), invalid (2), parsing (2), 構文エラー (2), out (2), plural (2), language (2), team (2), com (2), righteous (2), date (2), takanori (2), 2024 (2), 2023 (2), miyazaki (2), 1252 (2), 1156 (2), loc (2), path (2), breadcrumbs (2), latest (2), insights (2), repository (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), documentation (2), business (2), fixes (2), products (2), secret (2), perform, action, share, personal, manage, cookies, contact, privacy, terms, 2026, inc, remainder, クトが常に, 即座に正しくクリーンアップされることを保証します, ケーションでは問題になりえます, 文はファイルのようなオブジェ, までいることです, これは単純なスクリプトでは問題になりませんが, 大きなアプリ, このコードの問題点は, コードの実行が終わった後に不定の時間ファイルを開いたま, correctly, ensures, cleaned, promptly, larger, like, issue, scripts, indeterminate, amount, leaves, をオープンして内容を画面に表示する例をみてください, る標準的なクリーンアップ処理が定義されているものがあります, 以下の, ファイル, オブジェクトのなかには, その利用の成否にかかわらず, 不要になった際に実行され, contents, screen, succeeded, tries, longer, needed, operation, undertaken, 定義済みクリーンアップ処理, predefined, 利です, 接続などの, 外部リソースを, 利用が成功したかどうかにかかわらず解放するために便, 実世界のアプリケーションでは, ファイルやネットワーク, successful, releasing, external, network, connections, real, 処理されていないので, 節実行後に再度送出されています, 文字列で割り算をすることで発生した, 見てわかるとおり, 節はどの場合にも実行されています, dividing, strings, unsupported, operand, より複雑な例, complicated, returned, includes, 節が実行されます, 文または, 文の実行の直前に, 文のいずれかに達すると, 文また, prior, reaches, executes, れます, あり得ます, その場合も, 節が実行された後に例外が再送出さ, 節または, 節の実行中に例外が発生することが, 送出されます, よって処理されなければ, 節が実行された後に, その例外が再, 節によって処理されるでしょう, もしその例外が, 文の実行中に例外が発生したら, 発生するという更に複雑なケースを議論します, せるか否かに関わらず, 節は実行されます, 以下では, 例外が, 節が実行します, 文が例外を発生さ, 節がある場合, 文が終わる前の最後の処, cases, produces, points, discuss, complex, runs, task, completes, 動作を定義するためのもので, どんな状況でも必ず実行されます, 例を示します, 文にはもう一つオプションの節があります, この節はクリーンアップ, circumstances, intended, クリーンアップ動作を定義する, defining, あるエラーを報告させるために, 独自の例外を定義しています, 多くの標準モジュールでは, モジュールで定義されている関数内で発生する可能性の, many, modules, されています, ほとんどの例外は, 標準の例外の名前付けと同様に, で終わる名前で定義, naming, similar, 生したときにハンドラがエラーに関する情報を取り出せるようにする程度にとどめま, 通常は単純なものにしておきます, 大抵は, いくつかの属性だけを提供し, 例外が発, 例外クラスでは, 普通のクラスができることなら何でも定義することができますが, extracted, usually, kept, often, offering, attributes, anything, クラスから, 直接または間接的に派生したものです, きます, のクラスについては, 例外は, 典型的, プログラム上で新しい例外クラスを作成することで, 独自の例外を指定することがで, creating, new, ユーザー定義例外, 例外の連鎖の仕組みに関して, 詳しくは, を参照してくださ, mechanics, 自動的な例外の連鎖を無効にするには, を指定します, idiom, disabling, automatic, これは例外を変換するときに便利です, transforming, にオプションの, 句を指定します, ある例外が他の例外から直接影響されていることを示すために, consequence, filenotfounderror, errno, directory, された例外のエラーメッセージに含まれます, 節の中で未処理の例外が発生した場合, その未処理の例外は処理, attached, included, section, 例外の連鎖, 単純な形式の, 文を使って例外を再送出させることができま, 例外が発生したかどうかを判定したいだけで, その例外を処理するつもりがなけれ, simpler, determine, don, の省略記法, shorthand, ンスタンス化されます, 例外クラスが渡された場合は, 引数無しのコンストラクタが呼び出され, 暗黙的にイ, たとえば, やそのサブクラス, でなければなりません, これは例外インスタンスか例外クラス, を継承したクラス, の唯一の引数は送出される例外を指し示します, instantiated, calling, constructor, implicitly, derives, sole, argument, 文を使って, 特定の例外を発生させることができます, programmer, force, specified, 例外を送出する, します, たとえ間接的にでも, 呼び出された関数の内部で発生した例外も処理, 例外ハンドラは, の直接内側で発生した例外を処理するだけではなくその, those, immediately, れるからです, たコードから送出されたもの以外の例外を過って捕捉してしまうという事態を避けら, なぜなら, そうすることで, 文で保護され, がよいでしょう, 追加のコードを付け加えるのは, 節よりも, 節の方, wasn, protected, avoids, accidentally, catching, better, adding, additional, 行です, が開けません, cannot, 例えば次のようにします, で全く例外が送出されなかったときに実行されるコードを書くのに役立ちま, 節よりも後ろに置かなければなりません, を設けることができます, 節を設ける場合, 全ての, 文には, オプションで, follow, 予期せぬエラー, データを整数に変換できません, osエラー, convert, data, はログ出力してから再度送出します, 呼び出し側でも例外を処理できるようにします, に対する最も一般的な例外処理のパターンでは, 例外を表示あるい, well, allowing, caller, pattern, log, ない例外はそのまま伝わるようにすることです, かし良い例外処理の手法とは, 処理対象の例外の型をできる限り詳細に書き, 予期し, はほぼすべての例外を捕捉するワイルドカードとして使えます, propagate, good, practice, specific, wildcard, catches, almost, everything, される, があります, 送出される, ユーザーがプログラムを中断させたいときに送出, を示すために使われているため処理されません, によって, のサブクラスではない例外は, 一般的にプログラムが終了すること, 一つである, 致命的でない例外すべての基底クラスです, はすべての例外に共通する基底クラスです, そのサブクラスの, wishes, terminate, include, non, として表示されます, 例外の, 出力は, 処理されない例外のメッセージ末尾, output, をアンパックする, 例外のサブクラスで上書きされる場合もあります, を直接出力しますが, 引数は, に格納される, 例外の型, unpack, overridden, stored, 参照せずとも, すべての引数を表示できます, み例外型には, が定義されており, 明示的に, 一般的には引数を保持する, 属性を持ちます, 利便性のため, 組み込, except節は例外名の後に変数を指定できます, その変数は例外インスタンスに紐付け, explicitly, accessing, without, attribute, stores, convenience, builtin, bound, 依存します, とも呼ばれます, 引数の有無および引数の型は, 例外の型に, 例外が発生するとき, 例外は関連付けられた値を持つことができます, この値は例外, presence, depend, associated, values, 駆動されるのです, 出力されるはずだったことに注意してください, 最初に一致した, が逆に並んでいた場合, が最初にくる場合, triggered, would, matching, were, reversed, の順に出力されます, その基底クラスのインスタンスにはマッチしません, 次のコードは, 例外とマッチします, その逆はありません, 派生クラスが書かれた, except節, 内のクラスは, そのクラスや派生クラスのインスタンスである, order, around, itself, ば次のようにします, では丸括弧で囲ったタプルという形で複数の例外を指定できます, 節内の別の例外ハンドラで起きた例外は処理しません, ハンドラは対応する, 内で発生した例外だけを処理し, 多くとも一つのハンドラしか実行されません, ハンドラを指定できます, 一つの, 文には複数の, が付けられ, 別々の例外に対する, multiple, parenthesized, tuple, corresponding, メッセージを出して実行を停止します, どこにもなければ, 処理されない例外, となり, エラー, 文の外側に渡されます, 例外に対するハンドラ, 処理部, もしも, で指定された例外と一致しない例外が発生すると, found, stops, outer, statements, 節が実行された後, ブロックの後ろへ実行が継続されます, 例外型が, キーワードの後に指定されている例外に一致する場, 節内の実行中に例外が発生すると, その節の残りは飛ばされます, continues, block, を終えます, 何も例外が発生しなければ, をスキップして, 文の実行, の間の文, が実行されます, キーワード, between, 文は下記のように動作します, works, follows, おっと, それは数字ではないようです, もう一度入力してくださ, 数字を入力してください, oops, please, enter, 例外が送出されることで通知されるということに注意してくだ, とができるようにしています, ユーザが生成した割り込みは, ポートしている何らかのキーを使って, 割り込みをかけてプログラムを中断させるこ, ユーザがプログラムに, またはオペレーティングシステムがサ, ださい, この例では, 有効な文字列が入力されるまでユーザに入力を促しますが, 例外を選別して処理するようなプログラムを書くことができます, 以下の例を見てく, generated, interruption, signalled, whatever, operating, system, supports, entered, asks, write, selected, 例外を処理する, 組み込み例外とその意味がリストされています, lists, meanings, 準入力から読み取られたコードは表示されません, の部分にはソースコード行をリストしたトレースバックが表示されます, しかし, スタックのトレースバック, の形式で示しています, 一般には, エラーメッセージの先頭部分では, 例外が発生した実行コンテキスト, read, display, general, contains, preceding, shows, 残りの行は例外の詳細で, その例外の型と何が起きたかに依存します, caused, provides, based, 予約語ではありません, 意義な慣習ですが, 必ずしも成り立ちません, 標準例外の名前は組み込みの識別子で, み例外について成り立ちますが, ユーザ定義の例外では, 成り立つようにするのは有, 型として出力される文字列は, 発生した例外の組み込み名です, これは全ての組み込, で起こり, その型がエラーメッセージの一部として出力されます, 上の例での, エラーメッセージの最終行は何が起こったかを示しています, 例外は様々な型, convention, identifiers, reserved, although, string, happened, come, セージになります, いきます, ほとんどの例外はプログラムで処理されず, 以下に示されるようなメッ, 的とは限りません, これから, プログラムで例外をどのように扱うかを学んで, しれません, 実行中に検出されたエラーは, と呼ばれ, 常に致命, たとえ文や式が構文的に正しくても, 実行しようとしたときにエラーが発生するかも, here, shown, soon, how, them, unconditionally, attempt, made, expression, syntactically, correct, が表示されるので, どこを見ればよいかが分かるようになっています, ファイルに書かれたコードの場合, ファイル名, 上の例では, と行番号, know, case, came, our, 出されており, これはその前にコロン, が抜けているためです, いので注意してください, 上記の例では, エラーは関数, のところで検, 分に矢印, が表示されます, ただし, この部分が本当に修正すべき箇所とは限らな, パーサが構文解析エラーと判断した行が表示されるとともに, エラーが検出された部, function, since, colon, missing, needs, fixed, parser, repeats, offending, displays, little, arrows, pointing, 強している間に最もよく遭遇する問題の一つでしょう, 構文エラーは構文解析エラー, としても知られており, kind, complaint, get, still, learning, perhaps, しょう, エラーには, 少なくとも, 二つのはっきり異なる種類があります, それは, の例を自分で試していたら, 実際にいくつかのエラーメッセージを見ていることで, これまでエラーメッセージについては簡単に触れるだけでしたが, チュートリアル中, distinguishable, kinds, tried, examples, probably, seen, there, least, now, haven, mentioned, エラーと例外, forms, nplurals, transfer, encoding, 8bit, text, plain, charset, utf, mime, japanese, https, app, transifex, doc, teams, 5390, translator, revision, 0000, pot, creation, 0300, bugs, project, fuzzy, suzuki, takanory, net, tenmyo, masakazu, takuya, futatsugi, souma987, arihiro, takase, yusuke, dev, gmail, tomo, translators, author, email, address, year, distributed, license, package, copyright, 2001, software, foundation, descriptive, title, 1000, 999, 998, 997, 996, 995, 994, 993, 992, 991, 990, 989, 988, 987, 986, 985, 984, 983, 982, 981, 980, 979, 978, 977, 976, 975, 974, 973, 972, 971, 970, 969, 968, 967, 966, 965, 964, 963, 962, 961, 960, 959, 958, 957, 956, 955, 954, 953, 952, 951, 950, 949, 948, 947, 946, 945, 944, 943, 942, 941, 940, 939, 938, 937, 936, 935, 934, 933, 932, 931, 930, 929, 928, 927, 926, 925, 924, 923, 922, 921, 920, 919, 918, 917, 916, 915, 914, 913, 912, 911, 910, 909, 908, 907, 906, 905, 904, 903, 902, 901, 900, 899, 898, 897, 896, 895, 894, 893, 892, 891, 890, 889, 888, 887, 886, 885, 884, 883, 882, 881, 880, 879, 878, 877, 876, 875, 874, 873, 872, 871, 870, 869, 868, 867, 866, 865, 864, 863, 862, 861, 860, 859, 858, 857, 856, 855, 854, 853, 852, 851, 850, 849, 848, 847, 846, 845, 844, 843, 842, 841, 840, 839, 838, 837, 836, 835, 834, 833, 832, 831, 830, 829, 828, 827, 826, 825, 824, 823, 822, 821, 820, 819, 818, 817, 816, 815, 814, 813, 812, 811, 810, 809, 808, 807, 806, 805, 804, 803, 802, 801, 800, 799, 798, 797, 796, 795, 794, 793, 792, 791, 790, 789, 788, 787, 786, 785, 784, 783, 782, 781, 780, 779, 778, 777, 776, 775, 774, 773, 772, 771, 770, 769, 768, 767, 766, 764, 763, 762, 761, 760, 759, 758, 757, 756, 755, 754, 753, 752, 751, 750, 749, 748, 747, 746, 745, 744, 743, 742, 741, 740, 739, 738, 737, 736, 735, 734, 733, 732, 731, 730, 729, 728, 727, 726, 725, 724, 723, 722, 721, 720, 719, 718, 717, 716, 715, 714, 713, 712, 711, 710, 709, 708, 707, 706, 705, 704, 703, 702, 701, 700, 699, 698, 697, 696, 695, 694, 693, 692, 691, 690, 689, 688, 687, 686, 685, 684, 683, 682, 681, 680, 679, 678, 677, 676, 675, 674, 673, 672, 671, 670, 669, 668, 667, 666, 665, 664, 663, 662, 661, 660, 659, 658, 657, 656, 655, 654, 653, 652, 651, 650, 649, 648, 647, 646, 645, 644, 643, 642, 641, 640, 639, 638, 637, 636, 635, 634, 633, 632, 631, 630, 629, 628, 627, 626, 625, 624, 623, 622, 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, 611, 610, 609, 608, 607, 606, 605, 604, 603, 602, 601, 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, 590, 589, 588, 587, 586, 585, 584, 583, 582, 581, 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, 570, 569, 568, 567, 566, 565, 564, 563, 562, 561, 560, 559, 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, 548, 547, 546, 545, 544, 543, 542, 541, 540, 539, 538, 537, 536, 535, 534, 533, 532, 531, 530, 529, 528, 527, 526, 525, 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, 514, 513, 512, 511, 510, 509, 508, 507, 506, 505, 504, 503, 501, 500, 498, 497, 496, 495, 493, 491, 490, 489, 488, 487, 486, 485, 483, 482, 481, 480, 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, 468, 467, 466, 465, 464, 463, 462, 461, 460, 459, 458, 457, 456, 455, 454, 453, 451, 449, 448, 447, 446, 445, 444, 443, 442, 440, 438, 437, 436, 435, 434, 433, 432, 430, 429, 428, 427, 426, 424, 423, 422, 421, 420, 418, 417, 416, 414, 413, 412, 411, 410, 408, 407, 406, 405, 404, 402, 401, 400, 399, 398, 397, 396, 395, 394, 393, 391, 390, 389, 387, 385, 384, 383, 382, 381, 380, 378, 377, 375, 374, 373, 371, 370, 369, 367, 365, 364, 363, 362, 361, 359, 358, 357, 356, 355, 354, 353, 352, 351, 349, 348, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, 331, 330, 329, 328, 327, 326, 324, 322, 321, 319, 318, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 298, 297, 296, 294, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 276, 275, 274, 272, 270, 269, 268, 267, 266, 264, 263, 262, 261, 260, 258, 257, 255, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 239, 238, 237, 235, 234, 233, 232, 230, 229, 228, 227, 226, 225, 224, 223, 221, 220, 219, 218, 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, 202, 201, 200, 198, 197, 196, 195, 193, 192, 191, 190, 189, 188, 187, 185, 184, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 165, 164, 163, 162, 161, 159, 158, 157, 155, 154, 152, 151, 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, 136, 135, 133, 132, 131, 130, 128, 127, 125, 124, 123, 122, 121, 119, 118, 117, 115, 114, 113, 112, 110, 109, 107, 106, 104, 102, 101, 100, edit, symbols, panel, download, metadata, controls, top, commit, expand, tree, items, pull, requests, issues, dismiss, alert, switched, accounts, appearance, settings, search, pricing, talks, workshops, next, partners, company, forum, events, webinars, blog, connect, premium, advanced, add, ons, trust, why, evaluate, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, enterprises, stage, businesses, improvements, across, developer, articles, sponsors, trending, repos, explore, customize, certifications, scanning, leak, prevention, protection, vulnerability, detection, remediation, secure, cloud, development, environments, codespaces, analysis, enforcement, automation, ship, coding, agent, tasks, projects, automated, work, hosting, review, collaboration, platform, menu, skip,
|