Movatterモバイル変換


[0]ホーム

URL:


ContentsMenuExpandLight modeDark modeAuto light/dark, in light modeAuto light/dark, in dark modeSkip to content
Pillow (PIL Fork) 12.0.0 documentation
Light LogoDark Logo
Pillow (PIL Fork) 12.0.0 documentation
Back to top

Source code for PIL._util

from__future__importannotationsimportosTYPE_CHECKING=FalseifTYPE_CHECKING:fromtypingimportAny,NoReturn,TypeGuardfrom._typingimportStrOrBytesPath
[docs]defis_path(f:Any)->TypeGuard[StrOrBytesPath]:returnisinstance(f,(bytes,str,os.PathLike))
[docs]classDeferredError:def__init__(self,ex:BaseException):self.ex=exdef__getattr__(self,elt:str)->NoReturn:raiseself.ex
[docs]@staticmethoddefnew(ex:BaseException)->Any:""" Creates an object that raises the wrapped exception ``ex`` when used, and casts it to :py:obj:`~typing.Any` type. """returnDeferredError(ex)
Copyright © 1995-2011 Fredrik Lundh and contributors, 2010 Jeffrey A. Clark and contributors.
Made withSphinx and@pradyunsg'sFuro

[8]
ページ先頭

©2009-2025 Movatter.jp