mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 23:22:01 +00:00
b3f3d79f4c
This renames example files from `exampleN` to `example-description`. Specifically, the following renaming is applied: example1 -> example-methods-and-attributes example2 -> example-python-types example3 -> example-operator-overloading example4 -> example-constants-and-functions example5 -> example-callbacks (*) example6 -> example-sequence-and-iterators example7 -> example-buffers example8 -> example-custom-ref-counting example9 -> example-modules example10 -> example-numpy-vectorize example11 -> example-arg-keywords-and-defaults example12 -> example-virtual-functions example13 -> example-keep-alive example14 -> example-opaque-types example15 -> example-pickling example16 -> example-inheritance example17 -> example-stl-binders example18 -> example-eval example19 -> example-custom-exceptions * the inheritance parts of example5 are moved into example-inheritance (previously example16), and the remainder is left as example-callbacks. This commit also renames the internal variables ("Example1", "Example2", "Example4", etc.) into non-numeric names ("ExampleMandA", "ExamplePythonTypes", "ExampleWithEnum", etc.) to correspond to the file renaming. The order of tests is preserved, but this can easily be changed if there is some more natural ordering by updating the list in examples/CMakeLists.txt.
138 lines
4.2 KiB
Plaintext
138 lines
4.2 KiB
Plaintext
15
|
||
5
|
||
example.ExamplePythonTypes: No constructor defined!
|
||
can't set attribute
|
||
key: key2, value=value2
|
||
key: key, value=value
|
||
key: key, value=value
|
||
key: key2, value=value2
|
||
key: key3
|
||
key: key2
|
||
key: key1
|
||
key: key1
|
||
key: key2
|
||
key: key3
|
||
Entry at positon 0: value
|
||
list item 0: overwritten
|
||
list item 1: value2
|
||
list item 0: value
|
||
list item 1: value2
|
||
[u'array entry 1', u'array entry 2']
|
||
array item 0: array entry 1
|
||
array item 1: array entry 2
|
||
This exception was intentionally thrown.
|
||
(u'test', True)
|
||
(5L, u'test', True)
|
||
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, (bool, unicode)) -> (unicode, bool)
|
||
|
|
||
| Return a pair in reversed order
|
||
|
|
||
| pprriinntt__aarrrraayy(...)
|
||
| Signature : (example.ExamplePythonTypes, list<unicode>[2]) -> NoneType
|
||
|
|
||
| Print entries of a C++ array
|
||
|
|
||
| pprriinntt__ddiicctt(...)
|
||
| Signature : (example.ExamplePythonTypes, dict) -> NoneType
|
||
|
|
||
| Print entries of a Python dictionary
|
||
|
|
||
| pprriinntt__ddiicctt__22(...)
|
||
| Signature : (example.ExamplePythonTypes, dict<unicode, unicode>) -> NoneType
|
||
|
|
||
| Print entries of a C++ dictionary
|
||
|
|
||
| pprriinntt__lliisstt(...)
|
||
| Signature : (example.ExamplePythonTypes, list) -> NoneType
|
||
|
|
||
| Print entries of a Python list
|
||
|
|
||
| pprriinntt__lliisstt__22(...)
|
||
| Signature : (example.ExamplePythonTypes, list<unicode>) -> NoneType
|
||
|
|
||
| Print entries of a C++ list
|
||
|
|
||
| pprriinntt__sseett(...)
|
||
| Signature : (example.ExamplePythonTypes, set) -> NoneType
|
||
|
|
||
| Print entries of a Python set
|
||
|
|
||
| pprriinntt__sseett__22(...)
|
||
| Signature : (example.ExamplePythonTypes, set<unicode>) -> NoneType
|
||
|
|
||
| Print entries of a C++ set
|
||
|
|
||
| tthhrrooww__eexxcceeppttiioonn(...)
|
||
| Signature : (example.ExamplePythonTypes) -> NoneType
|
||
|
|
||
| Throw an exception
|
||
|
|
||
| ttuuppllee__ppaasssstthhrroouugghh(...)
|
||
| Signature : (example.ExamplePythonTypes, (bool, unicode, int)) -> (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
|
||
__name__(example.ExamplePythonTypes) = ExamplePythonTypes
|
||
__module__(example.ExamplePythonTypes) = example
|
||
__name__(example.ExamplePythonTypes.get_set) = get_set
|
||
__module__(example.ExamplePythonTypes.get_set) = example
|
||
Destructing ExamplePythonTypes
|