Results of 1 - 10 of about 13 for goto (0.008 sec.)
- Python 初期化設定 12017
- Python 初期化設定 PyInitConfig C API Added in version 3.14. Python は Py_InitializeFromInitConfig() で初期化できます。 Py_RunMain() 関数は、カスタマイズされた Python プログラムを書くために使用できます。 Initialization, Finalization, and Thr
...ion failed \n " ); return -1 ; } // Python 開発モードを有効化 if ( PyInitConfig_SetInt ( config , "dev_mode" , 1 ) < 0 ) { goto error ; } // Python を設定付きで初期化 if ( Py_InitializeFromInitConfig ( config ) < 0 ) { goto error ; } PyInitConfig_Fre...e ( config ); return 0 ; error : { // エラーメッセージを表示する。 // // この稀な括弧スタイルは、変数宣言を指す goto ターゲットを // 作ることができないために使用されています。 const char * err_msg ; ( void ) PyInitConfig_GetError ( config...期化する (隔離モード)。 */ status = PyConfig_SetBytesArgv ( & config , argc , argv ); if ( PyStatus_Exception ( status )) { goto exception ; } status = Py_InitializeFromConfig ( & config ); if ( PyStatus_Exception ( status )) { goto exception ; } PyCo... - https://man.mtool.work/python/3.14/c-api/init_config.html
- デザインと歴史 FAQ 11032
- デザインと歴史 FAQ Python はなぜ文のグループ化にインデントを使うのですか? Guido van Rossum の信じるところによれば、インデントによるグループ化は非常にエレガントで、普通の Python プログラムを大いに読みやすくします。しばらくすればほとんどの人は
...の部分を記述するよう求めています。ご心配なく、Python は、あなたがいい加減でもテストケースを全く書かなくても構いません。 なぜ goto が無いのですか? 1970年代、人々は気付きました。秩序なき goto は、理解するのも手直しするのも困難という厄介な"スパゲッティ"コ...ードに陥りがちであると。 高水準言語では、分岐とループの手段があれば goto は不要です。 (Pythonだと、分岐には if 文及び or ・ and ・ if / else 式を使います。ループには while 文と for 文を使い、 ルー...プ内に continue ・ break を含むことがあります) 関数の呼び出しをまたいでも動作する "構造化された goto" をまかなうものとして例外を使えます。C、Fortran、その他の言語での go あるいは goto 構造の適切な用途は全て、例外で同じような... - https://man.mtool.work/python/3.14/faq/design.html
- turtle --- タートルグラフィックス 11032
- turtle --- タートルグラフィックス ソースコード: Lib/turtle.py Turtle star 単純な動きを繰り返すプログラムで、タートルは複雑な図形を描けます。 x-y 平面の (0, 0) から動き出す、亀のロボットを想像してください。 import turtle の後に turtle.forwar
...す。 mode() を参照してください。 >>> turtle . heading () 22.0 >>> turtle . left ( 45 ) >>> turtle . heading () 67.0 turtle. goto ( x , y = None ) turtle. setpos ( x , y = None ) turtle. setposition ( x , y = None ) パラメータ : x -- 数または数のペア/ベ...。 ペンが下りていると線を描きます。 タートルの向きは変わりません。 >>> tp = turtle . pos () >>> tp (0.00,0.00) >>> turtle . goto ( 60 , 30 ) >>> turtle . pos () (60.00,30.00) >>> turtle . goto (( 20 , 80 )) >>> turtle . pos () (20.00,80.00) >>> turtle.... goto ( tp ) >>> turtle . pos () (0.00,0.00) turtle. teleport ( x = None , y = None , * , fill_gap = False ) パラメータ : x -- 数... - https://man.mtool.work/python/3.14/library/turtle.html
- cmd --- 行指向のコマンドインタープリターのサポート 10539
- cmd --- 行指向のコマンドインタープリターのサポート ソースコード: Lib/cmd.py Cmd クラスでは、行指向のコマンドインタープリタを書くための簡単なフレームワークを提供します。テストハーネスや管理ツール、そして、後により洗練されたインターフェイスで
...( arg )) def do_left ( self , arg ): 'Turn turtle left by given number of degrees: LEFT 90' left ( * parse ( arg )) def do_goto ( self , arg ): 'Move turtle to an absolute position with changing orientation. GOTO 100 200' goto ( * parse ( arg )) def...? to list commands. (turtle) ? Documented commands (type help <topic>): ======================================== bye color goto home playback record right circle forward heading left position reset undo (turtle) help forward Move the turtle forward b... - https://man.mtool.work/python/3.14/library/cmd.html
- はじめに 9818
- はじめに Python のアプリケーションプログラマー向けインターフェース (API) は、C と C++ のプログラマーに、Python インタープリタへのさまざまなレベルのアクセスを提供します。 C++ からも同様に使えますが、簡潔に Python/C API と呼びます。 Python/C
...tItem ( dict , key ); if ( item == NULL ) { /* KeyError のみ処理する: */ if ( ! PyErr_ExceptionMatches ( PyExc_KeyError )) goto error ; /* エラーを消去してゼロを使う: */ PyErr_Clear (); item = PyLong_FromLong ( 0L ); if ( item == NULL ) goto error ;...} const_one = PyLong_FromLong ( 1L ); if ( const_one == NULL ) goto error ; incremented_item = PyNumber_Add ( item , const_one ); if ( incremented_item == NULL ) goto error ; if ( PyObject_S...etItem ( dict , key , incremented_item ) < 0 ) goto error ; rv = 0 ; /* 成功 */ /* 続いて後始末のコードを実行する */ error : /* 成功と失敗の両方で使う後始末のコード */ /* NUL... - https://man.mtool.work/python/3.14/c-api/intro.html
- 1. 他のアプリケーションへの Python の埋め込み 8340
- 1. 他のアプリケーションへの Python の埋め込み 前章では、 Python を拡張する方法、すなわち C 関数のライブラリを Python に結びつけて機能を拡張する方法について述べました。同じようなことを別の方法でも実行できます: それは、自分の C/C++ アプリケー
...status = PyConfig_SetBytesString ( & config , & config . program_name , argv [ 0 ]); if ( PyStatus_Exception ( status )) { goto exception ; } status = Py_InitializeFromConfig ( & config ); if ( PyStatus_Exception ( status )) { goto exception ; } PyCo... - https://man.mtool.work/python/3.14/extending/embedding.html
- モジュールオブジェクト (module object) 8093
- モジュールオブジェクト (module object) PyTypeObject PyModule_Type 次に属します: Stable ABI . この PyTypeObject のインスタンスは Python のモジュール型を表します。 Python プログラムには types.ModuleType として公開されています。 int PyModule_C
...ることなく、そのまま渡して呼び出せます。 使用例: if ( PyModule_Add ( module , "spam" , PyBytes_FromString ( value )) < 0 ) { goto error ; } Added in version 3.13. int PyModule_AddObject ( PyObject * module , const char * name , PyObject * value ) 次に属...) で 'obj' への強参照を解放する必要があります。 // 'obj' が NULL の場合、Py_XDECREF() は何もしません。 Py_XDECREF ( obj ); goto error ; } // PyModule_AddObject() が obj への参照を盗んだため、 // ここで Py_XDECREF(obj) は不要です。 バージョン 3.13 で... - https://man.mtool.work/python/3.14/c-api/module.html
- 1. Extending Python with C or C++ 7601
- 1. Extending Python with C or C++ It is quite easy to add new built-in modules to Python, if you know how to program in C. Such extension modules can do two things that can't be done directly in Python: they can implement new built-in objec
...status = PyConfig_SetBytesString ( & config , & config . program_name , argv [ 0 ]); if ( PyStatus_Exception ( status )) { goto exception ; } /* Initialize the Python interpreter. Required. If this step fails, it will be a fatal error. */ status = Py..._InitializeFromConfig ( & config ); if ( PyStatus_Exception ( status )) { goto exception ; } PyConfig_Clear ( & config ); /* Optionally import the module; alternatively, import can be deferred until th... - https://man.mtool.work/python/3.14/extending/extending.html
- 型オブジェクトの構造体 7354
- 型オブジェクトの構造体 新しい型を定義する PyTypeObject 構造体は、Python のオブジェクトシステムで特に重要な構造体の 1 つです。 型オブジェクトは PyObject_* 関数や PyType_* 関数で扱えますが、ほとんどの Python アプリケーションにとって関心のある
...PyObject * exc = PyErr_GetRaisedException (); if ( PyObject_CallFinalizerFromDealloc ( self ) < 0 ) { // self が復活した。 goto done ; } PyTypeObject * tp = Py_TYPE ( self ); if ( tp -> tp_flags & Py_TPFLAGS_HAVE_GC ) { PyObject_GC_UnTrack ( self );...tRaisedException (); // ... if ( do_something_that_might_raise () != success_indicator ) { PyErr_WriteUnraisable ( self ); goto done ; } done : // 保存した例外を復元する。上で発生した例外は黙って捨てられるので、 // 必要であれば先に必ず PyErr_WriteUnr... - https://man.mtool.work/python/3.14/c-api/typeobj.html
- 3. Python を構成する 7108
- 3. Python を構成する 3.1. ビルド要件 CPython をビルドするためには、次のものが必要です: C11 コンパイラ。 C11 オプション機能 は不要です。 Windows では、 Microsoft Visual Studio 2017 以降が必要です。 IEEE 754 浮動小数点数と 浮動小数点 Not-a-Nu
...12. BOLT_INSTRUMENT_FLAGS バイナリに計測処理を挿入するときに llvm-bolt に渡す引数。 Added in version 3.12. --with-computed-gotos 評価ループで計算型 goto を有効にします (対応するコンパイラではデフォルトで有効)。 --with-tail-call-interp CPython で末尾呼... - https://man.mtool.work/python/3.14/using/configure.html