per page, with , order by , clip by
Results of 1 - 10 of about 255 for TypeError (0.051 sec.)
変更履歴 — Python 3.14.8 ドキュメント 12745
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » 変更履歴 テーマ 自動 ライト ダーク | 変更履歴 ¶ Python next ¶ Release date: XXXX-XX-XX セキュリティ ¶ gh-157265 : In tarfile , when extrac ... lback attribute of ssl.SSLContext no longer removes the current callback. Deleting it now raises AttributeError instead of TypeError . gh-156173 : Calling zlib.Decompress.flush() on invalid compressed data now raises zlib.error instead of being silently i ... file, like for other errors during logging. gh-153970 : Calling str() on a subprocess.CalledProcessError no longer raises TypeError when its returncode is not an integer, such as None . gh-153005 : concurrent.interpreters.Queue.get() and concurrent.inter ... eys when the dictionary contains a mix of string and non-string keys. Previously the sort ran before the filter and raised TypeError . gh-140729 : Fix a pickling error in the cProfile module when profiling a script that uses multiprocessing.Process with t ...
https://man.mtool.work/python/3.14/whatsnew/changelog.html
json --- JSON エンコーダーとデコーダー — Python 3.14.8 ドキュメント 8310
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » インターネット上のデータの操作 » json --- JSON エンコーダーとデコーダー テーマ 自動 ライト ダーク | json --- JSON エンコーダーとデコ ... if isinstance ( obj , complex ): ... return { '__complex__' : True , 'real' : obj . real , 'imag' : obj . imag } ... raise TypeError ( f 'Cannot serialize object of { type ( obj ) } ' ) ... >>> json . dumps ( 1 + 2 j , default = custom_json ) '{"__complex ... if isinstance ( obj , complex ): ... return [ obj . real , obj . imag ] ... # Let the base class default method raise the TypeError ... return super () . default ( obj ) ... >>> json . dumps ( 2 + 1 j , cls = ComplexEncoder ) '[2.0, 1.0]' >>> ComplexEnco ... ) -- If True , keys that are not of a basic type ( str , int , float , bool , None ) will be skipped instead of raising a TypeError . Default False . ensure_ascii ( bool ) -- If True (the default), the output is guaranteed to have all incoming non-ASCII ...
https://man.mtool.work/python/3.14/library/json.html
json --- JSON エンコーダーとデコーダー — Python 3.14.8 ドキュメント 8061
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » インターネット上のデータの操作 » json --- JSON エンコーダーとデコーダー テーマ 自動 ライト ダーク | json --- JSON エンコーダーとデコ ... if isinstance ( obj , complex ): ... return { '__complex__' : True , 'real' : obj . real , 'imag' : obj . imag } ... raise TypeError ( f 'Cannot serialize object of { type ( obj ) } ' ) ... >>> json . dumps ( 1 + 2 j , default = custom_json ) '{"__complex ... if isinstance ( obj , complex ): ... return [ obj . real , obj . imag ] ... # Let the base class default method raise the TypeError ... return super () . default ( obj ) ... >>> json . dumps ( 2 + 1 j , cls = ComplexEncoder ) '[2.0, 1.0]' >>> ComplexEnco ... ) -- If True , keys that are not of a basic type ( str , int , float , bool , None ) will be skipped instead of raising a TypeError . Default False . ensure_ascii ( bool ) -- If True (the default), the output is guaranteed to have all incoming non-ASCII ...
https://man.mtool.work/python/3.14/library/json.html
dataclasses --- データクラス — Python 3.14.8 ドキュメント 7802
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » dataclasses --- データクラス テーマ 自動 ライト ダーク | dataclasses --- データクラス ¶ ソースコード: L ... is false, a ValueError is raised. If the class already defines any of __lt__() , __le__() , __gt__() , or __ge__() , then TypeError is raised. unsafe_hash : If true, force dataclasses to create a __hash__() method, even though it may not be safe to do so ... that you cannot both have an explicit __hash__() method in your dataclass and set unsafe_hash=True ; this will result in a TypeError . If eq and frozen are both true, by default @dataclass will generate a __hash__() method for you. If eq is true and froze ... en instances. See the discussion below. If __setattr__() or __delattr__() is defined in the class and frozen is true, then TypeError is raised. match_args : If true (the default is True ), the __match_args__ tuple will be created from the list of non keyw ...
https://man.mtool.work/python/3.14/library/dataclasses.html
dataclasses --- データクラス — Python 3.14.8 ドキュメント 7802
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » dataclasses --- データクラス テーマ 自動 ライト ダーク | dataclasses --- データクラス ¶ ソースコード: L ... is false, a ValueError is raised. If the class already defines any of __lt__() , __le__() , __gt__() , or __ge__() , then TypeError is raised. unsafe_hash : If true, force dataclasses to create a __hash__() method, even though it may not be safe to do so ... that you cannot both have an explicit __hash__() method in your dataclass and set unsafe_hash=True ; this will result in a TypeError . If eq and frozen are both true, by default @dataclass will generate a __hash__() method for you. If eq is true and froze ... en instances. See the discussion below. If __setattr__() or __delattr__() is defined in the class and frozen is true, then TypeError is raised. match_args : If true (the default is True ), the __match_args__ tuple will be created from the list of non keyw ...
https://man.mtool.work/python/3.14/library/dataclasses.html
Set オブジェクト — Python 3.14.8 ドキュメント 7683
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 具象オブジェクト (concrete object) レイヤ » Set オブジェクト テーマ 自動 ライト ダーク | Set オブジェクト ¶ このセクションでは se ... ときは、空の set を返します。 成功したら新しい set を、失敗したら NULL を返します。 iterable がイテレート可能でない場合は、 TypeError を送出します。 このコンストラクタは set をコピーするときにも使えます ( c=set(s) )。 注釈 The operation is atomic on free t ... 、空の frozenset を返します。 成功時には新しい set を、失敗時には NULL を返します。 iterable がイテレート可能でない場合は、 TypeError を送出します。 注釈 The operation is atomic on free threading when iterable is a set , frozenset or dict . 以降の関数やマク ... hon __contains__() method, this function does not automatically convert unhashable sets into temporary frozensets. Raise a TypeError if the key is unhashable. Raise SystemError if anyset is not a set , frozenset , or an instance of a subtype. 注釈 The ope ...
https://man.mtool.work/python/3.14/c-api/set.html
8. 複合文 (compound statement) — Python 3.14.8 ドキュメント 7294
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 8. 複合文 (compound statement) テーマ 自動 ライト ダーク | 8. 複合文 (compound statement) ¶ 複合文には、他の文 (のグループ) が入ります; ... 、 sys モジュールに格納されている例外の値が、一つ前の値に戻ります: >>> print ( sys . exception ()) None >>> try : ... raise TypeError ... except : ... print ( repr ( sys . exception ())) ... try : ... raise ValueError ... except : ... print ( repr ( sys . ... exception ())) ... print ( repr ( sys . exception ())) ... TypeError() ValueError() TypeError() >>> print ( sys . exception ()) None 8.4.2. except* 節 ¶ The except* clause(s) specify one or m ... ted as in the case of except , but matching is performed on the exceptions contained in the group that is being handled. A TypeError is raised if a matching type is a subclass of BaseExceptionGroup , because that would have ambiguous semantics. When an ex ...
https://man.mtool.work/python/3.14/reference/compound_stmts.html
8. 複合文 (compound statement) — Python 3.14.8 ドキュメント 7294
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 8. 複合文 (compound statement) テーマ 自動 ライト ダーク | 8. 複合文 (compound statement) ¶ 複合文には、他の文 (のグループ) が入ります; ... 、 sys モジュールに格納されている例外の値が、一つ前の値に戻ります: >>> print ( sys . exception ()) None >>> try : ... raise TypeError ... except : ... print ( repr ( sys . exception ())) ... try : ... raise ValueError ... except : ... print ( repr ( sys . ... exception ())) ... print ( repr ( sys . exception ())) ... TypeError() ValueError() TypeError() >>> print ( sys . exception ()) None 8.4.2. except* 節 ¶ The except* clause(s) specify one or m ... ted as in the case of except , but matching is performed on the exceptions contained in the group that is being handled. A TypeError is raised if a matching type is a subclass of BaseExceptionGroup , because that would have ambiguous semantics. When an ex ...
https://man.mtool.work/python/3.14/reference/compound_stmts.html
2. 拡張の型の定義: チュートリアル — Python 3.14.8 ドキュメント 7174
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 2. 拡張の型の定義: チュートリアル テーマ 自動 ライト ダーク | 2. 拡張の型の定義: チュートリアル ¶ Python では、組み込みの s ... す。例えば次の通りです: >>> "" + custom . Custom () Traceback (most recent call last): File "<stdin>" , line 1 , in <module> TypeError : can only concatenate str (not "custom.Custom") to str 型の名前が、モジュール名とモジュールにおける型の名前の両方をドット ... ython で定義されたクラスも継承している場合にうまく動かない場合があります。 (とりわけ、そのようなサブクラスのインスタンスを TypeError を出さずに作ることが不可能になります。) We also define an initialization function which accepts arguments to provide initi ... * value , void * closure ) { CustomObject * self = ( CustomObject * ) op ; if ( value == NULL ) { PyErr_SetString ( PyExc_TypeError , "Cannot delete the first attribute" ); return -1 ; } if ( ! PyUnicode_Check ( value )) { PyErr_SetString ( PyExc_TypeErr ...
https://man.mtool.work/python/3.14/extending/newtypes_tutorial.html
6. 式 (expression) — Python 3.14.8 ドキュメント 7174
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 6. 式 (expression) テーマ 自動 ライト ダーク | 6. 式 (expression) ¶ この章では、Python の式における個々の要素の意味について解説します。 ... hen creating the iterator is also emitted immediately: >>> ( x ** 2 for x in None ) Traceback (most recent call last): ... TypeError : 'NoneType' object is not iterable All other expressions are evaluated lazily, in the same fashion as normal generators ( ... れたあらゆる例外は根底のイテレータに適切なメソッドがあれば渡されます。適切なメソッドがない場合、 send() は AttributeError か TypeError を、 throw() は渡された例外を即座に送出します。 根底のイテレータの完了時、引き起こされた StopIteration インスタンスの valu ... d for the first time. 1 >>> print ( next ( generator )) None >>> print ( generator . send ( 2 )) 2 >>> generator . throw ( TypeError , "spam" ) TypeError('spam',) >>> generator . close () Don't forget to clean up when 'close()' is called. yield from の使用 ...
https://man.mtool.work/python/3.14/reference/expressions.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT