Results of 1 - 10 of about 79 for names (0.005 sec.)
- importlib.resources -- パッケージリソースの読み取り、オープン、アクセス 17499
- importlib.resources -- パッケージリソースの読み取り、オープン、アクセス ソースコード: Lib/importlib/resources/__init__.py Added in version 3.7. このモジュールは Python のインポートシステムを利用し、 パッケージ 内の リソース にアクセスする機
...べての関数について、次の規則が適用されます。 anchor は files() と同じく Anchor です。 files と異なり、省略できません。 path_names は、基点からの相対パスとして表したリソースのパス名の構成要素です。 例えば info.txt というリソースのテキストを取得するには、...ortlib . resources . read_binary ( my_module , "pics" , "painting.png" ) 後方互換性のため、テキストを読む関数に複数の path_names を渡す場合は、 encoding 引数を明示する必要があります。 例えば info/chapter1.txt のテキストを取得するには、次のようにします...read_text ( my_module , "info" , "chapter1.txt" , encoding = 'utf-8' ) importlib.resources. open_binary ( anchor , * path_names ) 指定した名前のリソースを、バイナリとして読み取るために開きます。 anchor と path_names の詳細は 冒頭の説明 を参照してくだ... - https://man.mtool.work/python/3.14/library/importlib.resources.html
- fnmatch --- Unix のファイル名パターンマッチ 9821
- fnmatch --- Unix のファイル名パターンマッチ ソースコード: Lib/fnmatch.py このモジュールは Unix のシェル形式のワイルドカードに対応しています。これらは、 ( re モジュールでドキュメント化されている) 正規表現とは 異なります 。シェル形式のワイルド
...トして、 True または False を返します。比較は大文字、小文字を区別し、 os.path.normcase() は適用しません。 fnmatch. filter ( names , pat ) ファイル名文字列の イテラブル names のうち、パターン文字列 pat にマッチする要素からリストを作成します。 [n for n i...n names if fnmatch(n, pat)] と同じですが、より効率的に実装されています。 fnmatch. filterfalse ( names , pat ) ファイル名文字列の イ...テラブル names のうち、パターン文字列 pat にマッチしない要素からリストを作成します。 [n for n in names if not fnmatch(n, pat)] と同じです... - https://man.mtool.work/python/3.14/library/fnmatch.html
- デスクリプタ ガイド 8598
- デスクリプタ ガイド Author : Raymond Hettinger Contact : <python at rcn dot com> デスクリプタ を使うと、オブジェクトの属性の検索、保存、削除をカスタマイズできます。 本ガイドは4つの大項目から構成されています。 最初の「入門」では基本の紹介をし
...basicConfig ( level = logging . INFO ) class LoggedAccess : def __set_name__ ( self , owner , name ): self . public_name = name self . private_name = '_' + name def __get__ ( self , obj , objtype = None ): value = getattr ( obj , self . private_name )...' , 'metal' , 'plastic' ) quantity = Number ( minvalue = 0 ) def __init__ ( self , name , kind , quantity ): self . name = name self . kind = kind self . quantity = quantity これらのデスクリプタは、不正インスタンスが作成されるのを防ぎます。 >>> Compon...るクラス、 name はデスクリプタが代入されたクラス変数の名前です。 実装の詳細は Objects/typeobject.c の中の type_new() と set_names() を参照してください。 この更新処理は type.__new__() にあるため、通知はクラスの作成時にだけ行われます。 後からクラスにデス... - https://man.mtool.work/python/3.14/howto/descriptor.html
- ast --- 抽象構文木 8241
- ast --- 抽象構文木 ソースコード: Lib/ast.py ast モジュールは、Python の抽象構文を表す木を Python アプリケーションで処理するための機能を提供します。 抽象構文自体は Python のリリースごとに変わる可能性がありますが、このモジュールを使えば、現在
...ody , excepthandler * handlers , stmt * orelse , stmt * finalbody ) | Assert ( expr test , expr ? msg ) | Import ( alias * names ) | ImportFrom ( identifier ? module , alias * names , int ? level ) | Global ( identifier * names ) | Nonlocal ( identifi...er * names ) | Expr ( expr value ) | Pass | Break | Continue -- col_offset is the byte offset in the utf8 string the parser uses attr...version 3.12. 関数またはループの内部でのみ適用可能な他の文は、別のセクションで説明します。 インポート class ast. Import ( names ) インポート文です。 names は alias ノードのリストです。 >>> print ( ast . dump ( ast . parse ( 'import x,y,z' ), indent =... - https://man.mtool.work/python/3.14/library/ast.html
- The Python Profilers 8241
- The Python Profilers Source code: Lib/profile.py and Lib/pstats.py Introduction to the profilers cProfile and profile provide deterministic profiling of Python programs. A profile is a set of statistics that describes how often and for how
...trip_dirs () . sort_stats ( - 1 ) . print_stats () The strip_dirs() method removed the extraneous path from all the module names. The sort_stats() method sorted all the entries according to the standard module/line/name string that is printed. The pri...s will be printed. The Stats Class Analysis of the profiler data is done using the Stats class. class pstats. Stats ( *filenames or profile , stream=sys.stdout ) This class constructor creates an instance of a "statistics object" from a filename (or l...ist of filenames) or from a Profile instance. Output will be printed to the stream specified by stream . The file selected by the above con... - https://man.mtool.work/python/3.14/library/profile.html
- 10. 完全な文法仕様 8241
- 10. 完全な文法仕様 以下は Python の完全な文法で、CPython のパーサを生成するための文法から直接得たものです ( Grammar/python.gram を参照)。 ここでは、コード生成とエラー回復に関する詳細を省略しています。 ここで使う記法は、これまでのドキュメント
...# * Strings with double quotes (") denote SOFT KEYWORDS # * Strings with single quotes (') denote KEYWORDS # * Upper case names (NAME) denote tokens in the Grammar/Tokens file # * Rule names starting with "invalid_" are used for specialized syntax er...ssion ] import_stmt : | import_name | import_from # Import statements # ----------------- import_name : 'import' dotted_as_names # note below: the ('.' | '...') is necessary because '...' is tokenized as ELLIPSIS import_from : | 'from' ( '.' | '...' )...rt' import_from_targets | 'from' ( '.' | '...' ) + 'import' import_from_targets import_from_targets : | '(' import_from_as_names [ ',' ] ')' | import_from_as_names !',' | '*' import_from_as_names : | ',' . import_from_as_name + import_from_as_name : |... - https://man.mtool.work/python/3.14/reference/grammar.html
- dis --- Python バイトコードの逆アセンブラー 7802
- dis --- Python バイトコードの逆アセンブラー ソースコード: Lib/dis.py dis モジュールは、CPython の bytecode を逆アセンブルして解析するためのものです。 このモジュールが入力として受け取る CPython のバイトコードは Include/opcode.h で定義され、コ
...す真偽値もプッシュしていました。 STORE_NAME ( namei ) name = STACK.pop() を実行します。 namei は、 コードオブジェクト の co_names 属性内の name のインデックスです。 コンパイラは、可能なら STORE_FAST または STORE_GLOBAL を使おうとします。 DELETE_NAME (...namei ) del name を実行します。 namei は コードオブジェクト の co_names 属性内のインデックスです。 UNPACK_SEQUENCE ( count ) STACK[-1] を count 個の値にアンパックし、右から左の順にスタックに置き...の処理を実行します。 obj = STACK . pop () value = STACK . pop () obj . name = value ここで namei は コードオブジェクト の co_names 内の name のインデックスです。 DELETE_ATTR ( namei ) 次の処理を実行します。 obj = STACK . pop () del obj . name ここで nam... - https://man.mtool.work/python/3.14/library/dis.html
- 4. 実行モデル 7705
- 4. 実行モデル 4.1. プログラムの構造 Python プログラムはコードブロックから構成されます。 ブロック ( block ) は、一つのまとまりとして実行される Python プログラムテキストの断片です。 モジュール、関数本体、そしてクラス定義はブロックであり、対話
...プチャパターン内。 import 文. type 文。 型パラメータのリスト 。 The import statement of the form from ... import * binds all names defined in the imported module, except those beginning with an underscore. This form may only be used at the module level....UnboundLocalError についての FAQ 項目 を参照してください。 If the global statement occurs within a block, all uses of the names specified in the statement refer to the bindings of those names in the top-level namespace. Names are resolved in the top-...level namespace by searching the global namespace, i.e. the namespace of the module containing the code block, and the builtins namesp... - https://man.mtool.work/python/3.14/reference/executionmodel.html
- sysconfig --- Python の構成情報へのアクセスを提供する 7623
- sysconfig --- Python の構成情報へのアクセスを提供する Added in version 3.2. ソースコード: Lib/sysconfig sysconfig モジュールは、インストールパスの一覧や現在のプラットフォームに関する構成変数など、Python の構成情報へのアクセスを提供します。
...data prefix インストールパスの関数 sysconfig は、これらのインストールパスを求める関数を提供します。 sysconfig. get_scheme_names ( ) sysconfig が現在サポートするすべてのスキームを含むタプルを返します。 sysconfig. get_default_scheme ( ) 現在のプラットフ...構成に適したスキーム名を返します。 key は "prefix" 、 "home" 、 "user" のいずれかでなければなりません。 戻り値は get_scheme_names() に含まれるスキーム名です。 get_paths() など、 scheme 引数を受け取る sysconfig の関数に渡せます。 Added in version 3.10....関数ではなく、 get_default_scheme() と get_preferred_scheme() を使ってください。 Added in version 3.10. sysconfig. get_path_names ( ) sysconfig が現在サポートするすべてのパス名を含むタプルを返します。 sysconfig. get_path ( name [ , scheme [ , vars [ ,... - https://man.mtool.work/python/3.14/library/sysconfig.html
- xmlrpc.server --- 基本的な XML-RPC サーバー 7623
- xmlrpc.server --- 基本的な XML-RPC サーバー ソースコード: Lib/xmlrpc/server.py xmlrpc.server モジュールは、Python で記述する XML-RPC サーバーの基本的なフレームワークを提供します。 SimpleXMLRPCServer を使うと独立したサーバーを作成でき、 CGIX
...変更: register_function() はデコレーターとして使用できます。 SimpleXMLRPCServer. register_instance ( instance , allow_dotted_names = False ) オブジェクトを登録します。 オブジェクトは register_function() を使用して登録されていないメソッド名を公開するのに...ce に _dispatch() メソッドがない場合、リクエストされたメソッド名にマッチする属性を検索します。 オプション引数 allow_dotted_names が真でインスタンスに _dispatch() メソッドがない場合、リクエストされたメソッド名がピリオドを含むなら、メソッド名の各要素が個...的検索が行われます。 その検索で発見された値をリクエストの引数で呼び出し、クライアントに返り値を返します。 警告 allow_dotted_names オプションを有効にすると、侵入者はあなたのモジュールのグローバル変数にアクセスすることができ、あなたのマシンで任意のコード... - https://man.mtool.work/python/3.14/library/xmlrpc.server.html