public protocol ConvertibleFromPython
A type that can be initialized from a PythonObject
.
-
Creates a new instance from the given
PythonObject
, if possible.Note
Conversion may fail if the givenPythonObject
instance is incompatible (e.g. a Pythonstring
object cannot be converted into anInt
).Declaration
init?(_ object: PythonObject)