Results of 1 - 10 of about 26 for lower (0.012 sec.)
- functools --- 高階関数と呼び出し可能オブジェクトの操作 13241
- functools --- 高階関数と呼び出し可能オブジェクトの操作 ソースコード: Lib/functools.py functools モジュールは、ほかの関数を操作したり返したりする高階関数のためのモジュールです。 一般に、このモジュールではあらゆる呼び出し可能オブジェクトを関数
...def __eq__ ( self , other ): if not self . _is_valid_operand ( other ): return NotImplemented return (( self . lastname . lower (), self . firstname . lower ()) == ( other . lastname . lower (), other . firstname . lower ())) def __lt__ ( self , othe...r ): if not self . _is_valid_operand ( other ): return NotImplemented return (( self . lastname . lower (), self . firstname . lower ()) < ( other . lastname . lower (), other . firstname . lower ())) 注釈 このデコレータにより... - https://man.mtool.work/python/3.14/library/functools.html
- 組み込み型 10480
- 組み込み型 以下のセクションでは、インタプリタに組み込まれている標準型について記述します。 主要な組み込み型は、数値、シーケンス、マッピング、クラス、インスタンス、および例外です。 コレクションクラスには、ミュータブルなものがあります。コレクシ
...le' ) b'\xe8\x03' 整数は length バイトで表されます、デフォルト値は 1 です。整数が与えられた数のバイトで表せなければ、 OverflowError が送出されます。 byteorder 引数は、整数を表すのに使われるバイトオーダーを決定します。デフォルト値は "big" です。 byteor...す。 signed 引数は、整数を表すのに 2 の補数を使うかどうかを決定します。 signed が False で、負の整数が与えられたなら、 OverflowError が送出されます。 signed のデフォルト値は False です。 上記のデフォルト値は整数を 1 バイトのオブジェクトに適切に変換する...ます: >>> ( 65 ) . to_bytes () b'A' ただし、デフォルト引数で 255 より大きな整数を変換しないでください。 そうでなければ OverflowError 例外を引き起こします。 次と等価です: def to_bytes ( n , length = 1 , byteorder = 'big' , signed = False ): if byteorder... - https://man.mtool.work/python/3.14/builtins/stdtypes.html
- compression.zstd --- Zstandard 形式に対応した圧縮 10480
- compression.zstd --- Zstandard 形式に対応した圧縮 Added in version 3.14. ソースコード: Lib/compression/zstd/__init__.py このモジュールは、Zstandard (または zstd ) 圧縮アルゴリズムを使ってデータを圧縮・展開するクラスと関数を提供します。 zstd
...す。 パラメータは省略可能です。 省略したパラメータの値は自動的に選択されます。 compression_level の下限と上限を取得する例。 lower , upper = CompressionParameter . compression_level . bounds () window_log を最大サイズに設定する例。 _lower , upper = Comp...g : upper } compress ( b 'venezuelan beaver cheese' , options = options ) bounds ( ) 圧縮パラメータの整数の範囲を、タプル (lower, upper) として返します。 このメソッドは、範囲を取得したい属性に対して呼び出してください。 例えば、 compression_level の有効...効な値を取得できます。 window_log_max を最大サイズに設定する例。 data = compress ( b 'Some very long buffer of bytes...' ) _lower , upper = DecompressionParameter . window_log_max . bounds () options = { DecompressionParameter . window_log_max : upper... - https://man.mtool.work/python/3.14/library/compression.zstd.html
- What's New In Python 3.2 10480
- What's New In Python 3.2 著者 : Raymond Hettinger この記事では Python 3.1 と比較した Python 3.2 の新機能を説明します。 Python 3.2 は 2011 年 2 月 20 日にリリースされました。 主な変更点をいくつか取り上げ、例を示します。 すべての詳細については
...atus is {status} as of {date} ' . format_map ( d ) 'The testing project status is green as of February 15, 2011' >>> class LowerCasedDict ( dict ): ... def __getitem__ ( self , key ): ... return dict . __getitem__ ( self , key . lower ()) ... >>> lcd...= LowerCasedDict ( part = 'widgets' , quantity = 10 ) >>> 'There are {QUANTITY} {Part} in stock' . format_map ( lcd ) 'There are 1...__ , __gt__ , __ge__ を補います。 @total_ordering class Student : def __eq__ ( self , other ): return (( self . lastname . lower (), self . firstname . lower ()) == ( other . lastname . lower (), other . firstname . lower ())) def __lt__ ( self , othe... - https://man.mtool.work/python/3.14/whatsnew/3.2.html
- warnings --- 警告の制御 9802
- warnings --- 警告の制御 ソースコード: Lib/warnings.py 警告メッセージは一般に、ユーザに警告しておいた方がよいような状況下にプログラムが置かれているが、その状況は (通常は) 例外を送出したりそのプログラムを終了させるほどの正当な理由がないといっ
...cklevel) に置き換えられます。 現在のパッケージの外から呼び出した箇所に警告を対応させるには、次のように書けます。 # example/lower.py _warn_skips = ( os . path . dirname ( __file__ ),) def one_way ( r_luxury_yacht = None , t_wobbler_mangrove = None ): i...s . warn ( "Please migrate to t_wobbler_mangrove=." , skip_file_prefixes = _warn_skips ) # example/higher.py from . import lower def another_way ( ** kw ): lower . one_way ( ** kw ) これにより、 example.lower.one_way() と example.higher.another_way()... - https://man.mtool.work/python/3.14/library/warnings.html
- What's New in Python 2.4 9802
- What's New in Python 2.4 著者 : A.M. Kuchling この文書は 2005 年 3 月 30 日にリリースされた Python 2.4.1 の新機能について解説します。 Python 2.4 は、真ん中サイズ、のリリースです。急進的だった Python 2.2 ほどには多くの変更をしていませんが、保
...文字を区別してソート >>> L ['A', 'D', 'b', 'c'] >>> # 'key' パラメーターでリストをソート >>> L . sort ( key = lambda x : x . lower ()) >>> L ['A', 'b', 'c', 'D'] >>> # 従来の方法 >>> L . sort ( cmp = lambda x , y : cmp ( x . lower (), y . lower ())) >>>...大文字・小文字を区別せずにソートする従来の方法です。 動作はしますが、 key パラメーターを使うより遅くなります。 key を使うと lower() メソッドをリストの各要素について 1 回呼び出すのに対し、 cmp を使うと比較のたびに 2 回呼び出すため、 key の方が lower() の...非束縛メソッドを使えます。例えば上記の大文字小文字によらない並べ替えはこのように書くのが最善です: >>> L . sort ( key = str . lower ) >>> L ['A', 'b', 'c', 'D'] 最後の reverse パラメータはブーリアン値を取ります。真ならばリストは逆順にソートされます。 L.s... - https://man.mtool.work/python/3.14/whatsnew/2.4.html
- C API Stability 9455
- C API Stability 特記のない限り、Python の C API には後方互換性ポリシー PEP 387 が適用されます。 変更の大半はソース互換性を保ちます (通常は新しい API の追加だけを行います)。 既存 API の変更や削除は、非推奨の期間を経た後、または重大な問題を修
...their packaging tools) need to ensure that, for example, extensions built with the 3.10+ Limited API are not installed for lower versions of Python. All functions in the Stable ABI are present as functions in Python's shared library, not solely as mac...semantics. One issue that Py_LIMITED_API does not guard against is calling a function with arguments that are invalid in a lower Python version. For example, consider a function that starts accepting NULL for an argument. In Python 3.9, NULL now selec...ABI stays stable. プラットフォームで考慮すべき点 ABI stability depends not only on Python, but also on the compiler used, lower-level libraries and compiler options. For the purposes of the Stable ABI , these details define a “platform”. They usually... - https://man.mtool.work/python/3.14/c-api/stable.html
- ast --- 抽象構文木 9455
- ast --- 抽象構文木 ソースコード: Lib/ast.py ast モジュールは、Python の抽象構文を表す木を Python アプリケーションで処理するための機能を提供します。 抽象構文自体は Python のリリースごとに変わる可能性がありますが、このモジュールを使えば、現在
...pr * elts , expr_context ctx ) | Tuple ( expr * elts , expr_context ctx ) -- can appear only in Subscript | Slice ( expr ? lower , expr ? upper , expr ? step ) -- col_offset is the byte offset in the utf8 string the parser uses attributes ( int lineno...]' , mode = 'eval' ), indent = 4 )) Expression( body=Subscript( value=Name(id='l', ctx=Load()), slice=Tuple( elts=[ Slice( lower=Constant(value=1), upper=Constant(value=2)), Constant(value=3)], ctx=Load()), ctx=Load())) class ast. Slice ( lower , uppe...r , step ) 基本的なスライス操作 ( lower:upper や lower:upper:step の形式) をあらわします。 Subscript の slice フィールドでの直接指定か、または Tuple の要素として指... - https://man.mtool.work/python/3.14/library/ast.html
- cmd --- 行指向のコマンドインタープリターのサポート 8761
- cmd --- 行指向のコマンドインタープリターのサポート ソースコード: Lib/cmd.py Cmd クラスでは、行指向のコマンドインタープリタを書くための簡単なフレームワークを提供します。テストハーネスや管理ツール、そして、後により洗練されたインターフェイスで
...int ( 'Current heading is %d \n ' % ( heading (),)) def do_color ( self , arg ): 'Set the color: COLOR BLUE' color ( arg . lower ()) def do_undo ( self , arg ): 'Undo (repeatedly) the last turtle action(s): UNDO' def do_reset ( self , arg ): 'Clear th...with open ( arg ) as f : self . cmdqueue . extend ( f . read () . splitlines ()) def precmd ( self , line ): line = line . lower () if self . file and 'playback' not in line : print ( line , file = self . file ) return line def close ( self ): if self... - https://man.mtool.work/python/3.14/library/cmd.html
- heapq --- ヒープキューアルゴリズム 8414
- heapq --- ヒープキューアルゴリズム ソースコード: Lib/heapq.py このモジュールではヒープキューアルゴリズムの一実装を提供しています。優先度キューアルゴリズムとしても知られています。 最小ヒープは、各親ノードの値がそのどの子ノードの値以下でもある
...ます。(あたえられた場合) key は、引数を一つとる、 iterable のそれぞれの要素から比較キーを生成する関数を指定します(例 key=str.lower )。以下のコードと同等です: sorted(iterable, key=key, reverse=True)[:n] heapq. nsmallest ( n , iterable , key = None ) iter...ます。(あたえられた場合) key は、引数を一つとる、 iterable のそれぞれの要素から比較キーを生成する関数を指定します(例 key=str.lower )。以下のコードと同等です: sorted(iterable, key=key)[:n] 後ろ二つの関数は n の値が小さな場合に最適な動作をします。大きな値... - https://man.mtool.work/python/3.14/library/heapq.html