GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-100450: Add `sqlite.Row.__contains__` method by sobolevn · Pull Request #100457 · python/cpython Conversation
|
| static int | ||
| pysqlite_row_contains(pysqlite_Row* self, PyObject *arg) | ||
| { | ||
| Py_ssize_t nitems, i; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Please use intermingled declarations :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| for (i = 0; cmp == 0 && i < nitems; i++) { | ||
| cmp = PyObject_RichCompareBool( | ||
| arg, | ||
| PyTuple_GET_ITEM(PyTuple_GET_ITEM(self->description, i), 0), |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
There's a lot happening on this line. I'd prefer it if you extracted these items before calling PyObject_RichCompareBool, for improved readability.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@erlend-aasland Hmm, is this whole thing not wrong anyway? (See my comment in the issue thread.) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I've added two doctests, aren't they enough? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The doctests are there to make sure the examples in the docs actually work; it is not the place for unit tests. The unit tests (and regression tests, functional tests, etc.) all live in If I want to check the code coverage of the Also, I'm not sure the buildbots run doctests; IIRC, they only run the test suite, but I might be wrong about this. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sure, @erlend-aasland, I've added a unit test :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Thanks! BTW; I haven't decided if this is a good thing to add, or not. But lets keep that conversation on the issue. I'm going to mark this with do-not-merge until the discussion has landed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Should we open this to wider discussion on Discourse/Core development? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yeah, IMO it is worth it trying to gather more feedback on Discourse. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.