-
Notifications
You must be signed in to change notification settings - Fork 31
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
sip.voidptr handles integer values and sequences #104
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely convinced that voidptr.__init__
doesn't have some magic going on behind the scenes allowing it to have a self
-less __init__
. Maybe it does something very strange with CPython, or with __new__
.
Also, I tried looking through the sip
source for this class and I have no idea where it is, or how it's generated, so that was a bust.
I think we should document this change so we can ask about it in the future. Can it be added to the changelog?
Without claiming that I now think I know what's up... >>> help(sip.voidptr)
Help on class voidptr in module PyQt5.sip:
class voidptr(builtins.object)
| Methods defined here:
|
| __bool__(self, /)
| self != 0
|
| __delitem__(self, key, /)
| Delete self[key].
|
| __getitem__(self, key, /)
| Return self[key].
|
| __int__(self, /)
| int(self)
|
| __len__(self, /)
| Return len(self).
|
| __setitem__(self, key, value, /)
| Set self[key] to value.
|
| asarray(...)
|
| ascapsule(...)
|
| asstring(...)
|
| getsize(...)
|
| getwriteable(...)
|
| setsize(...)
|
| setwriteable(...)
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature. >>> inspect.signature(sip.voidptr.__init__)
<Signature (self, /, *args, **kwargs)> >>> sip.voidptr.__init__()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: descriptor '__init__' of 'object' object needs an argument If we end up merging something here without full satisfaction, maybe it would make sense to have a ticket rather than a changelog entry to track the need for future work? |
If we continue with the change as-is, we should probably include it in the changelog. Opening an issue is a good idea regardless of if we continue with the change here in this PR |
Does it need I thought you suggested more changelog commentary covering uncertainty about what this bit of stub should be. That bit I thought belonged in an issue not a changelog entry. I agree the change made here ought to have an entry for the change itself. |
Yeah that's what I'm suggesting |
sip.voidptr handles integer values and sequences
No description provided.