mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 13:15:12 +00:00
673b4be3d7
* Fix py::kw_only when used before the first arg of a method The implicit space for the `self` argument isn't added until we hit the first argument, but this wasn't being done for kw_only or pos_only, and so a kw_only before the first argument would break. This fixes it by properly checking whether we need to add the self arg. (The pos_only issue here was extremely mild -- you didn't get the `/` in the docstring, but AFAICT it has no other effect since there are no meaningful arguments before it anyway). * Style changes - rename check_have_self_arg -> append_self_arg_if_needed - move the argument name inline comments before the args instead of after |
||
---|---|---|
.. | ||
pybind11 |