Python 3.6.5 ドキュメント 検索
Results of 41 - 50 of about 98 for KEY (0.034 sec.)
- デスクリプタ HowTo ガイド — Python 3.6.5 ドキュメント 6167
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python HOWTO » デス
...
、このようになります: def __getattribute__ ( self , key ): "Emulate type_getattro() in Objects/typeobject....
c" v = object . __getattribute__ ( self , key ) if hasattr ( v , '__get__' ): return v . __get__...
ることです。Python 2.3 では、クラスメソッド dict.fromkeys() は新しい辞書をキーのリストから生成します。等価な...
Python 版は: class Dict ( object ): . . . def fromkeys ( klass , iterable , value = None ): "Emulate dic...
- https://man.plustar.jp/python/howto/descriptor.html - [similar]
- 26.5. unittest.mock --- モックオブジェクトライブラリ — Python 3.6.5 ドキュメン... 6167
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ
...
eturn_value = 3 ) >>> thing . method ( 3 , 4 , 5 , key = 'value' ) 3 >>> thing . method . assert_called_w...
ith ( 3 , 4 , 5 , key = 'value' ) side_effect によって、モック呼び出し時...
作用を実行できます: >>> mock = Mock ( side_effect = KeyError ( 'foo' )) >>> mock () Traceback (most recent...
call last): ... KeyError : 'foo' >>> values = { 'a' : 1 , 'b' : 2 , 'c...
- https://man.plustar.jp/python/library/unittest.mock.html - [similar]
- What's New in Python 2.0 — Python 3.6.5 ドキュメント 6167
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » What's New in Pytho
...
tuple of positional args, # kw is a dictionary of keyword args ... print 文がUnix シェルのリダイレクト操...
---) 辞書に、ちょっと風変わりなメソッド setdefault(key, default) が追加されました。これは既存の get() メソ...
そうするように default を返しつつ、同時に辞書にキー key の値として追加もします。ですから以下コード: if dic...
t . has_key ( key ): return dict [ key ] else : dict [ key ] =...
- https://man.plustar.jp/python/whatsnew/2.0.html - [similar]
- What's New in Python 2.2 — Python 3.6.5 ドキュメント 6167
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » What's New in Pytho
...
9 , 'Oct' : 10 , 'Nov' : 11 , 'Dec' : 12 } >>> for key in m : print key , m [ key ] ... Mar 3 Feb 2 Aug 8...
。キーで、値で、キーと値のペアで反復したければ、 iterkeys() , itervalues() , iteritems() で適切なイテレータ...
取れます (---訳注: Python 3 では対応するメソッド名が keys , values , items に変わっただけでなく、これらは「...
更点としては、 in 演算子は今では辞書に対して動作し、 key in dict は dict.has_key(key) と等価です (---訳注:...
- https://man.plustar.jp/python/whatsnew/2.2.html - [similar]
- 16.1. os --- 雑多なオペレーティングシステムインタフェース — Python 3.6.5 ドキュ... 6128
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ
...
返す必要があります( str が好まれます)。 os. getenv ( key , default=None ) ¶ 環境変数 key が存在すればその値...
を返し、存在しなければ default を返します。 key 、 default 、および返り値は文字列です。 Unix では、...
環境 : 主な Unix 互換環境、 Windows 。 os. getenvb ( key , default=None ) ¶ 環境変数 key が存在すればその値...
を返し、存在しなければ default を返します。 key 、 default 、および返り値はバイト列型です。 getenv...
- https://man.plustar.jp/python/library/os.html - [similar]
- 6. 式 (expression) — Python 3.6.5 ドキュメント 6128
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 言語リファレ
...
定義については 識別子 (identifier) およびキーワード (keyword) 節を、名前付けや束縛については 名前づけと束縛...
の系列であってもかまいません: dict_display ::= "{" [ key_datum_list | dict_comprehension ] "}" key_datum_li...
st ::= key_datum ("," key_datum )* [","] key_datum ::= expres...
ent_list ::= positional_arguments ["," starred_and_keywords ] ["," keywords_arguments ] | starred_and_key...
- https://man.plustar.jp/python/reference/expressions.html - [similar]
- What's New in Python 2.5 — Python 3.6.5 ドキュメント 6128
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » What's New in Pytho
...
ています。---): BaseException # New in Python 2.5 |- KeyboardInterrupt |- SystemExit |- Exception |- ( all...
ラムのエラーを示す例外すべてを捕捉したがるからです。 KeyboardInterrupt と SystemExit はエラーではありません...
に全ての例外を捕捉しますから、一般に、再送出のために KeyboardInterrupt と SystemExit はリストする必要があり...
。お決まりのパターンはこんなです: try : ... except ( KeyboardInterrupt , SystemExit ): raise except : # Log...
- https://man.plustar.jp/python/whatsnew/2.5.html - [similar]
- What's New In Python 3.1 — Python 3.6.5 ドキュメント 6128
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » What's New in Pytho
...
す。 PEP 372: 順序付き辞書 ¶ 通常の Python 辞書は、 key/value ペアを不定の順序でイテレートします。何年にも...
わたり、いろいろな人が key の挿入順を保存する辞書の別実装を書いてきました。そ...
は通常の辞書と同じインタフェースを提供していますが、 key/value をイテレートするときに key が最初に挿入された...
- https://man.plustar.jp/python/whatsnew/3.1.html - [similar]
- 19.3. mailcap --- mailcap ファイルの操作 — Python 3.6.5 ドキュメント 6089
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ
...
れています。 mailcap. findmatch ( caps , MIMEtype , key='view' , filename='/dev/null' , plist=[] ) ¶ 2 要素...
が見つからなかった場合、 (None, None) が返されます。 key は desired フィールドの値で、実行すべき動作のタイプ...
- https://man.plustar.jp/python/library/mailcap.html - [similar]
- シーケンス型プロトコル (sequence protocol) — Python 3.6.5 ドキュメント 6050
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python/C API リファ
...
*value ) ¶ o における value の出現回数、すなわち o[key] == value となる key の個数を返します。失敗すると...
- https://man.plustar.jp/python/c-api/sequence.html - [similar]