mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-11 08:50:31 +00:00
Rename examples files, as per #288
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.
This commit is contained in:
55
example/example-arg-keywords-and-defaults.ref
Normal file
55
example/example-arg-keywords-and-defaults.ref
Normal file
@@ -0,0 +1,55 @@
|
||||
Help on built-in function kw_func in module example
|
||||
|
||||
kkww__ffuunncc(...)
|
||||
kw_func(x : int, y : int) -> NoneType
|
||||
|
||||
Help on built-in function kw_func2 in module example
|
||||
|
||||
kkww__ffuunncc22(...)
|
||||
kw_func2(x : int = 100L, y : int = 200L) -> NoneType
|
||||
|
||||
Help on built-in function kw_func3 in module example
|
||||
|
||||
kkww__ffuunncc33(...)
|
||||
kw_func3(data : unicode = u'Hello world!') -> NoneType
|
||||
|
||||
Help on built-in function kw_func4 in module example
|
||||
|
||||
kkww__ffuunncc44(...)
|
||||
kw_func4(myList : list<int> = [13L, 17L]) -> NoneType
|
||||
|
||||
Help on built-in function kw_func_udl in module example
|
||||
|
||||
kkww__ffuunncc__uuddll(...)
|
||||
kw_func_udl(x : int, y : int = 300L) -> NoneType
|
||||
|
||||
Help on built-in function kw_func_udl_z in module example
|
||||
|
||||
kkww__ffuunncc__uuddll__zz(...)
|
||||
kw_func_udl_z(x : int, y : int = 0L) -> NoneType
|
||||
|
||||
kw_func(x=5, y=10)
|
||||
kw_func(x=5, y=10)
|
||||
kw_func(x=5, y=10)
|
||||
kw_func(x=100, y=200)
|
||||
kw_func(x=5, y=200)
|
||||
kw_func(x=5, y=200)
|
||||
kw_func(x=100, y=10)
|
||||
kw_func(x=5, y=10)
|
||||
kw_func(x=5, y=10)
|
||||
Caught expected exception: Incompatible function arguments. The following argument types are supported:
|
||||
1. (x : int = 100L, y : int = 200L) -> NoneType
|
||||
Invoked with:
|
||||
kw_func4: 13 17
|
||||
kw_func4: 1 2 3
|
||||
kw_func(x=1234, y=5678)
|
||||
got argument: arg1_value
|
||||
got argument: arg2_value
|
||||
got argument: 3
|
||||
got argument: arg1_value
|
||||
got argument: arg2_value
|
||||
got keyword argument: arg3 -> arg3_value
|
||||
got keyword argument: arg4 -> 4
|
||||
|
||||
kw_func(x=5, y=10)
|
||||
kw_func(x=5, y=0)
|
||||
Reference in New Issue
Block a user