We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__init__
While it is noted here in the docs: https://pybind11.readthedocs.io/en/stable/advanced/classes.html#overriding-virtual-functions-in-python it is still sometimes easy to forget. If it were somehow possible, it'd be nice to robustly detect access to unconstructed base classes. (... though it may be a big performance penalty, so I'm fine with this being closed as "Not a Problem")
Example failure case from above:
class Dachschund(Dog): def __init__(self, name): # Oops! self.name = name def bark(self): return "yap!" d = Dog("Sir Schnitzel") d.go(10) # Nuts!
Had run into it when writing this example, and then felt dumb once I realized what the problem was.
The text was updated successfully, but these errors were encountered:
Considering that we've merged #2152, can we close this now?
Sorry, something went wrong.
I say we can.
No branches or pull requests
While it is noted here in the docs:
https://pybind11.readthedocs.io/en/stable/advanced/classes.html#overriding-virtual-functions-in-python
it is still sometimes easy to forget. If it were somehow possible, it'd be nice to robustly detect access to unconstructed base classes. (... though it may be a big performance penalty, so I'm fine with this being closed as "Not a Problem")
Example failure case from above:
Had run into it when writing this example, and then felt dumb once I realized what the problem was.
The text was updated successfully, but these errors were encountered: