mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-02 12:41:39 +00:00
Add casting operators between py::str / py::bytes
This commit is contained in:
@@ -28,106 +28,106 @@ Help on class ExamplePythonTypes in module example
|
||||
|
||||
class EExxaammpplleePPyytthhoonnTTyyppeess(__builtin__.object)
|
||||
| Example 2 documentation
|
||||
|
|
||||
|
|
||||
| Methods defined here:
|
||||
|
|
||||
|
|
||||
| ____iinniitt____(...)
|
||||
| x.__init__(...) initializes x; see help(type(x)) for signature
|
||||
|
|
||||
|
|
||||
| ggeett__aarrrraayy(...)
|
||||
|
|
||||
|
|
||||
| Signature : (example.ExamplePythonTypes) -> List[unicode[2]]
|
||||
| Return a C++ array
|
||||
|
|
||||
|
|
||||
| ggeett__ddiicctt(...)
|
||||
| Signature : (example.ExamplePythonTypes) -> dict
|
||||
|
|
||||
|
|
||||
| Return a Python dictionary
|
||||
|
|
||||
|
|
||||
| ggeett__ddiicctt__22(...)
|
||||
|
|
||||
|
|
||||
| Signature : (example.ExamplePythonTypes) -> Dict[unicode, unicode]
|
||||
| Return a C++ dictionary
|
||||
|
|
||||
|
|
||||
| ggeett__lliisstt(...)
|
||||
| Signature : (example.ExamplePythonTypes) -> list
|
||||
|
|
||||
|
|
||||
| Return a Python list
|
||||
|
|
||||
|
|
||||
| ggeett__lliisstt__22(...)
|
||||
|
|
||||
|
|
||||
| Signature : (example.ExamplePythonTypes) -> List[unicode]
|
||||
| Return a C++ list
|
||||
|
|
||||
|
|
||||
| ggeett__sseett(...)
|
||||
| Signature : (example.ExamplePythonTypes) -> set
|
||||
|
|
||||
|
|
||||
| Return a Python set
|
||||
|
|
||||
|
|
||||
| ggeett__sseett22(...)
|
||||
| Signature : (example.ExamplePythonTypes) -> set
|
||||
|
|
||||
|
|
||||
| Return a C++ set
|
||||
|
|
||||
|
|
||||
| ppaaiirr__ppaasssstthhrroouugghh(...)
|
||||
|
|
||||
|
|
||||
| Signature : (example.ExamplePythonTypes, Tuple[bool, unicode]) -> Tuple[unicode, bool]
|
||||
| Return a pair in reversed order
|
||||
|
|
||||
|
|
||||
| pprriinntt__aarrrraayy(...)
|
||||
|
|
||||
|
|
||||
| Signature : (example.ExamplePythonTypes, List[unicode[2]]) -> None
|
||||
| Print entries of a C++ array
|
||||
|
|
||||
|
|
||||
| pprriinntt__ddiicctt(...)
|
||||
|
|
||||
|
|
||||
| Signature : (example.ExamplePythonTypes, dict) -> None
|
||||
| Print entries of a Python dictionary
|
||||
|
|
||||
|
|
||||
| pprriinntt__ddiicctt__22(...)
|
||||
|
|
||||
|
|
||||
| Signature : (example.ExamplePythonTypes, Dict[unicode, unicode]) -> None
|
||||
| Print entries of a C++ dictionary
|
||||
|
|
||||
|
|
||||
| pprriinntt__lliisstt(...)
|
||||
|
|
||||
|
|
||||
| Signature : (example.ExamplePythonTypes, list) -> None
|
||||
| Print entries of a Python list
|
||||
|
|
||||
|
|
||||
| pprriinntt__lliisstt__22(...)
|
||||
|
|
||||
|
|
||||
| Signature : (example.ExamplePythonTypes, List[unicode]) -> None
|
||||
| Print entries of a C++ list
|
||||
|
|
||||
|
|
||||
| pprriinntt__sseett(...)
|
||||
|
|
||||
|
|
||||
| Signature : (example.ExamplePythonTypes, set) -> None
|
||||
| Print entries of a Python set
|
||||
|
|
||||
|
|
||||
| pprriinntt__sseett__22(...)
|
||||
|
|
||||
|
|
||||
| Signature : (example.ExamplePythonTypes, Set[unicode]) -> None
|
||||
| Print entries of a C++ set
|
||||
|
|
||||
|
|
||||
| tthhrrooww__eexxcceeppttiioonn(...)
|
||||
|
|
||||
|
|
||||
| Signature : (example.ExamplePythonTypes) -> None
|
||||
| Throw an exception
|
||||
|
|
||||
|
|
||||
| ttuuppllee__ppaasssstthhrroouugghh(...)
|
||||
|
|
||||
|
|
||||
| Signature : (example.ExamplePythonTypes, Tuple[bool, unicode, int]) -> Tuple[int, unicode, bool]
|
||||
| Return a triple in reversed order
|
||||
|
|
||||
|
|
||||
| ----------------------------------------------------------------------
|
||||
| Data and other attributes defined here:
|
||||
|
|
||||
|
|
||||
| ____nneeww____ = <built-in method __new__ of example.ExamplePythonTypes__Meta object>
|
||||
| T.__new__(S, ...) -> a new object with type S, a subtype of T
|
||||
|
|
||||
|
|
||||
| nneeww__iinnssttaannccee = <built-in method new_instance of PyCapsule object>
|
||||
| Signature : () -> example.ExamplePythonTypes
|
||||
|
|
||||
|
|
||||
| Return an instance
|
||||
|
||||
__name__(example) = example
|
||||
@@ -138,3 +138,8 @@ __module__(example.ExamplePythonTypes.get_set) = example
|
||||
Instances not destroyed: 1
|
||||
### ExamplePythonTypes @ 0x1045b80 destroyed
|
||||
Instances not destroyed: 0
|
||||
Destructing ExamplePythonTypes
|
||||
foo
|
||||
bar
|
||||
baz
|
||||
boo
|
||||
|
||||
Reference in New Issue
Block a user