Python 3.6.5 ドキュメント 検索

phrase: max: clip:
target: order:
Results of 11 - 20 of about 111 for self (0.044 sec.)
8.8. weakref --- 弱参照 — Python 3.6.5 ドキュメント 8349
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... 別なコードがあります: >>> class C : ... def method ( self ): ... print ( "method called!" ) ... >>> c = C () ... to have been replaced by None . __call__ ( ) ¶ If self is alive then mark it as dead and return the resul ... t of calling func(*args, **kwargs) . If self is dead then return None . detach ( ) ¶ If self is ... nd return the tuple (obj, func, args, kwargs) . If self is dead then return None . peek ( ) ¶ If self is a ...
https://man.plustar.jp/python/library/weakref.html - [similar]
18.5.4. Transports and protocols (callback based API) — Python 3.6.5 ドキュメン... 8159
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... entProtocol ( asyncio . Protocol ): def __init__ ( self , message , loop ): self . message = message self ... . loop = loop def connection_made ( self , transport ): transport . write ( self . message ... . encode ()) print ( 'Data sent: {!r} ' . format ( self . message )) def data_received ( self , data ): pr ... format ( data . decode ())) def connection_lost ( self , exc ): print ( 'The server closed the connection ...
https://man.plustar.jp/python/library/asyncio-protocol.html - [similar]
ソート HOW TO — Python 3.6.5 ドキュメント 8045
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python HOWTO » ソー ... ます。例えば: >>> class Student : ... def __init__ ( self , name , grade , age ): ... self . name = name ... ... self . grade = grade ... self . age = age ... def __rep ... r__ ( self ): ... return repr (( self . name , self . grade , ... self . age )) >>> student_objects = [ ... Student ( 'jo ...
https://man.plustar.jp/python/howto/sorting.html - [similar]
24.2. cmd --- 行指向のコマンドインタープリタのサポート — Python 3.6.5 ドキュメ... 8020
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... ----- basic turtle commands ----- def do_forward ( self , arg ): 'Move the turtle forward by the specified ... WARD 10' forward ( * parse ( arg )) def do_right ( self , arg ): 'Turn turtle right by given number of deg ... : RIGHT 20' right ( * parse ( arg )) def do_left ( self , arg ): 'Turn turtle left by given number of degr ... es: LEFT 90' left ( * parse ( arg )) def do_goto ( self , arg ): 'Move turtle to an absolute position with ...
https://man.plustar.jp/python/library/cmd.html - [similar]
28.3. venv --- 仮想環境の作成 — Python 3.6.5 ドキュメント 7931
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... カスタマイズに使えるフックを説明します: def create ( self , env_dir ): """ Create a virtualized Python envir ... nv_dir = os . path . abspath ( env_dir ) context = self . ensure_directories ( env_dir ) self . create_con ... figuration ( context ) self . setup_python ( context ) self . setup_scripts ( ... context ) self . post_setup ( context ) メソッド ensure_directori ...
https://man.plustar.jp/python/library/venv.html - [similar]
8.13. enum --- 列挙型のサポート — Python 3.6.5 ドキュメント 7830
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... ... FUNKY = 1 ... HAPPY = 3 ... ... def describe ( self ): ... # self is the member here ... return self . ... name , self . value ... ... def __str__ ( self ): ... return ' ... my custom str! {0} ' . format ( self . value ) ... ... @classmethod ... def favorite_mo ... す: >>> class Foo ( Enum ): ... def some_behavior ( self ): ... pass ... >>> class Bar ( Foo ): ... HAPPY = ...
https://man.plustar.jp/python/library/enum.html - [similar]
プログラミング FAQ — Python 3.6.5 ドキュメント 7804
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python よくある質問 ... ブジェクト クラスとは何ですか? メソッドとは何ですか? self とは何ですか? あるオブジェクトが、与えられたクラス ... 梱することによって: class callByRef : def __init__ ( self , ** args ): for ( key , value ) in args . items ( ... ): setattr ( self , key , value ) def func4 ( args ): args . a = 'ne ... オブジェクトを使うと: class linear : def __init__ ( self , a , b ): self . a , self . b = a , b def __call_ ...
https://man.plustar.jp/python/faq/programming.html - [similar]
29.6. contextlib --- with 文コンテキスト用ユーティリティ — Python 3.6.5 ドキュ... 7804
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... n for object.__enter__() is provided which returns self while object.__exit__() is an abstract method whic ... ss mycontext ( ContextDecorator ): def __enter__ ( self ): print ( 'Starting' ) return self def __exit__ ( ... self , * exc ): print ( 'Finishing' ) return False >>> ... extBaseClass , ContextDecorator ): def __enter__ ( self ): return self def __exit__ ( self , * exc ): retu ...
https://man.plustar.jp/python/library/contextlib.html - [similar]
9.1. numbers --- 数の抽象基底クラス — Python 3.6.5 ドキュメント 7804
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... ash() を以下のように実装しています: def __hash__ ( self ): if self . denominator == 1 : # Get integers rig ... ht. return hash ( self . numerator ) # Expensive check, but definitely co ... rrect. if self == float ( self ): return hash ( float ( self )) e ... llision rate on # simple fractions. return hash (( self . numerator , self . denominator )) 9.1.2.1. さらに ...
https://man.plustar.jp/python/library/numbers.html - [similar]
26.4. unittest --- ユニットテストフレームワーク — Python 3.6.5 ドキュメント 7716
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ ... gMethods ( unittest . TestCase ): def test_upper ( self ): self . assertEqual ( 'foo' . upper (), 'FOO' ) ... def test_isupper ( self ): self . assertTrue ( 'FOO' . isupper ()) self . ... assertFalse ( 'Foo' . isupper ()) def test_split ( self ): s = 'hello world' self . assertEqual ( s . spli ... plit fails when the separator is not a string with self . assertRaises ( TypeError ): s . split ( 2 ) if _ ...
https://man.plustar.jp/python/library/unittest.html - [similar]
PREV 1 2 3 4 5 6 7 8 9 10 11 NEXT