per page, with , order by , clip by
Results of 1 - 10 of about 66 for arguments (0.008 sec.)
math --- 数学関数 12314
math --- 数学関数 このモジュールは、C 標準で定義されたものを含む、一般的な数学関数と定数を提供します。 これらの関数で複素数を使うことはできません。複素数に対応する必要があるならば、 cmath モジュールにある同じ名前の関数を使ってください。ほと ... e it is equivalent to the coefficient of k-th term in polynomial expansion of (1 + x)ⁿ . Raises TypeError if either of the arguments are not integers. Raises ValueError if either of the arguments are negative. Added in version 3.8. math. factorial ( n ) R ... s (like 5.0 ) are no longer accepted. math. gcd ( * integers ) Return the greatest common divisor of the specified integer arguments. If any of the arguments is nonzero, then the returned value is the largest positive integer that is a divisor of all argu ... ments. If all arguments are zero, then the returned value is 0 . gcd() without arguments returns 0 . Added in version 3.5. バージョン 3.9 で変更: ...
https://man.mtool.work/python/3.14/library/math.html
Call プロトコル 12172
Call プロトコル CPython は tp_call と vectorcall の二つの呼び出しプロトコルをサポートしています。 tp_call プロトコル tp_call を設定したクラスのインスタンスは呼び出し可能です。 このスロットのシグネチャは次のとおりです。 PyObject * tp_call ( ... table ABI (バージョン 3.12 より). callable は呼び出されるオブジェクトです。 args is a C array consisting of the positional arguments followed by the values of the keyword arguments. This can be NULL if there are no arguments. nargsf is the number of posit ... ional arguments plus possibly the PY_VECTORCALL_ARGUMENTS_OFFSET flag. To get the actual number of positional arguments from nargsf , use ... PyVectorcall_NARGS() . kwnames is a tuple containing the names of the keyword arguments; in other words, the keys of the kwargs dict. These names must be strings (instances of str or a subclass) and they must b ...
https://man.mtool.work/python/3.14/c-api/call.html
Argparse チュートリアル 12029
Argparse チュートリアル author : Tshepang Mbambo このチュートリアルでは、 argparse を丁寧に説明します。 argparse は、Python 標準ライブラリの一部であり、おすすめのコマンドライン引数の解析モジュールです。 注釈 標準ライブラリには、コマンドライ ... ns: -h, --help show this help message and exit $ python prog.py --verbose usage: prog.py [-h] prog.py: error: unrecognized arguments: --verbose $ python prog.py foo usage: prog.py [-h] prog.py: error: unrecognized arguments: foo こんなことが起こりました: ... nt ( args . echo ) このコードを実行してみましょう: $ python prog.py usage: prog.py [-h] echo prog.py: error: the following arguments are required: echo $ python prog.py --help usage: prog.py [-h] echo positional arguments: echo options: -h, --help show th ... _args () print ( args . echo ) 修正した結果は以下のようになります: $ python prog.py -h usage: prog.py [-h] echo positional arguments: echo echo the string you use here options: -h, --help show this help message and exit 次は、もっと有益なことをしてみません ...
https://man.mtool.work/python/3.14/howto/argparse.html
argparse --- コマンドラインオプションや引数、サブコマンド向けのパーサー 11044
argparse --- コマンドラインオプションや引数、サブコマンド向けのパーサー Added in version 3.2. ソースコード: Lib/argparse.py 注釈 argparse は基本的なコマンドラインアプリケーションの実装に推奨される標準ライブラリのモジュールですが、動作を厳密 ... ser . add_argument ( 'bar' , nargs = '+' , help = 'bar help' ) >>> parser . print_help () usage: PROG [options] positional arguments: bar bar help options: -h, --help show this help message and exit --foo [FOO] foo help %(prog)s フォーマット指定子を、使用 ... *' , default = [ 1 , 2 , 3 ], help = 'BAR!' ) >>> parser . print_help () usage: PROG [-h] [--foo FOO] [bar ...] positional arguments: bar BAR! (default: [1, 2, 3]) options: -h, --help show this help message and exit --foo FOO FOO! (default: 42) MetavarTyp ... >> parser . add_argument ( 'bar' , type = float ) >>> parser . print_help () usage: PROG [-h] [--foo int] float positional arguments: float options: -h, --help show this help message and exit --foo int prefix_chars ほとんどのコマンドラインオプションでは、 ...
https://man.mtool.work/python/3.14/library/argparse.html
ctypes --- Python 用の外部関数ライブラリ 9332
ctypes --- Python 用の外部関数ライブラリ ソースコード: Lib/ctypes ctypes は Python 用の外部関数ライブラリです。 C と互換性のあるデータ型を提供し、DLL や共有ライブラリの関数を呼び出せます。 これらのライブラリを純粋な Python でラップするために ... the argtypes attribute, as described in 要求される引数の型を指定する (関数プロトタイプ) . Without argtypes , the number of arguments is not checked. Calling a function with an incorrect calling convention or with incorrect arguments can corrupt memory or ... b " %s %d %f \n " , b "X" , 2 , 3 ) X 2 3.000000 13 >>> Setting argtypes also causes ctypes to raise TypeError if too few arguments are passed: >>> printf ( b " %s %d %f \n " , b "X" , 2 ) Traceback (most recent call last): File "<stdin>" , line 1 , in < ... module> TypeError : this function takes at least 4 arguments (3 given) Functions using the stdcall calling convention require exactly as many arguments as there are items in argtypes ...
https://man.mtool.work/python/3.14/library/ctypes.html
4. その他の制御フローツール 9047
4. その他の制御フローツール 前章で紹介した while 文の他にも、 Python にはいくつか制御フローツールがあり、本章で説明します。 4.1. if 文 おそらく最もおなじみの文型は if 文でしょう。例えば: >>> x = int ( input ( "Please enter an integer: " )) ... ます。 ( *name は **name より前になければなりません)。 例えば、ある関数の定義を以下のようにすると: def cheeseshop ( kind , * arguments , ** keywords ): print ( "-- Do you have any" , kind , "?" ) print ( "-- I'm sorry, we're all out of" , kind ) for arg in ... aceback (most recent call last): File "<stdin>" , line 1 , in <module> TypeError : pos_only_arg() got some positional-only arguments passed as keyword arguments: 'arg' 3番目の関数 kwd_only_arg は、関数定義に * があるので、引数はキーワード専用になります: > ... 3 ) Traceback (most recent call last): File "<stdin>" , line 1 , in <module> TypeError : kwd_only_arg() takes 0 positional arguments but 1 was given >>> kwd_only_arg ( arg = 3 ) 3 そして最後の関数は3つの引数の種類を一つの関数定義の中で使用しています: >>> ...
https://man.mtool.work/python/3.14/tutorial/controlflow.html
ast --- 抽象構文木 8761
ast --- 抽象構文木 ソースコード: Lib/ast.py ast モジュールは、Python の抽象構文を表す木を Python アプリケーションで処理するための機能を提供します。 抽象構文自体は Python のリリースごとに変わる可能性がありますが、このモジュールを使えば、現在 ... body ) | Expression ( expr body ) | FunctionType ( expr * argtypes , expr returns ) stmt = FunctionDef ( identifier name , arguments args , stmt * body , expr * decorator_list , expr ? returns , string ? type_comment , type_param * type_params ) | AsyncFu ... nctionDef ( identifier name , arguments args , stmt * body , expr * decorator_list , expr ? returns , string ? type_comment , type_param * type_params ) | ClassDe ... target , expr value ) | BinOp ( expr left , operator op , expr right ) | UnaryOp ( unaryop op , expr operand ) | Lambda ( arguments args , expr body ) | IfExp ( expr test , expr body , expr orelse ) | Dict ( expr ?* keys , expr * values ) | Set ( expr * ...
https://man.mtool.work/python/3.14/library/ast.html
10. 完全な文法仕様 8476
10. 完全な文法仕様 以下は Python の完全な文法で、CPython のパーサを生成するための文法から直接得たものです ( Grammar/python.gram を参照)。 ここでは、コード生成とエラー回復に関する詳細を省略しています。 ここで使う記法は、これまでのドキュメント ... ------------ class_def : | decorators class_def_raw | class_def_raw class_def_raw : | 'class' NAME [ type_params ] [ '(' [ arguments ] ')' ] ':' block # Function definitions # -------------------- function_def : | decorators function_def_raw | function_de ... ing)", "obj" ... await_primary : | 'await' primary | primary primary : | primary '.' NAME | primary genexp | primary '(' [ arguments ] ')' | primary '[' slices ']' | atom slices : | slice !',' | ',' . ( slice | starred_expression ) + [ ',' ] slice : | [ e ... ( assignment_expression | expression !':=' ) for_if_clauses ')' dictcomp : | '{' kvpair for_if_clauses '}' # FUNCTION CALL ARGUMENTS # ======================= arguments : | args [ ',' ] &')' args : | ',' . ( starred_expression | ( assignment_expression | ...
https://man.mtool.work/python/3.14/reference/grammar.html
1. Extending Python with C or C++ 8347
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 ... ere is a straightforward translation from the argument list in Python (for example, the single expression "ls -l" ) to the arguments passed to the C function. The C function always has two arguments, conventionally named self and args . The self argument ... method it would point to the object instance. The args argument will be a pointer to a Python tuple object containing the arguments. Each item of the tuple corresponds to an argument in the call's argument list. The arguments are Python objects --- in or ... checks the argument types and converts them to C values. It uses a template string to determine the required types of the arguments as well as the types of the C variables into which to store the converted values. More about this later. PyArg_ParseTuple( ...
https://man.mtool.work/python/3.14/extending/extending.html
監査イベント表 8205
監査イベント表 この表は、 CPython ランタイムと標準ライブラリ全体で sys.audit() または PySys_Audit() の呼び出しによって送出されるすべてのイベントを含んでいます。これらの呼び出しは、 3.8 以降に追加されました ( PEP 578 を参照) 。 これらのイベン ... トを表示していない可能性があります。実際に送出されるイベントは、ランタイム固有のドキュメントを参照してください。 Audit event Arguments References _thread.start_new_thread function , args , kwargs [1] array.__new__ typecode , initializer [1] builtins.breakpo ... python.run_startup filename [1] cpython.run_stdin [1] [2] [3] ctypes.addressof obj [1] ctypes.call_function func_pointer , arguments [1] ctypes.cdata address [1] ctypes.cdata/buffer pointer , size , offset [1] [2] ctypes.create_string_buffer init , size [ ... alue , flags [1] os.spawn mode , path , args , env [1] os.startfile path , operation [1] os.startfile/2 path , operation , arguments , cwd , show_cmd [1] os.symlink src , dst , dir_fd [1] os.system command [1] os.truncate fd , length [1] [2] os.unsetenv k ...
https://man.mtool.work/python/3.14/library/audit_events.html
PREV 1 2 3 4 5 6 7 NEXT