-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
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
Buffer class makes unexpected RPC calls #449
Comments
It could also implement |
I think thats an excellent idea, even though it would be a breaking change. im not sure what our policy is on that though |
Are there any circumstances that you would the buffer to be I think it seems reasonable to override |
ya, thats the case. a very minor breaking change, but then again i wouldn't be surprised if people actually relied on it. |
PR welcome. We monkey-patch various things, this is more or less idiomatic in python land. |
The Buffer class makes unexpected RPC calls.
This is due to the
__len__
method being called during boolean tests.For example, the following code will print
2
.This is very surprising behaviour, and there is absoutely no way to fix it without breaking backwards compatibility.
But it should be documentated, because this will actually break your code if you are using
Buffer
class from another thread.It took me a quite a bit of effort to figure out that an
or
statement was causing crashes in my plugin.The text was updated successfully, but these errors were encountered: