-
Notifications
You must be signed in to change notification settings - Fork 67
Closed
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
python-ndb/google/cloud/ndb/query.py
Lines 2375 to 2377 in 88184c3
more = results and ( | |
iterator._more_results_after_limit or iterator.probably_has_next() | |
) |
For consistency, the type of more
should always be boolean (as suggested by the function's doc-string). However due to the current evaluation, it can sometimes be a list.
In the case where there are no results found, results
will be an empty list and hence so will more
.
i.e.
[] and False = [] # Not "False"
I noticed this, as I am serialising these values into a Protobuf which is type checking.
JPedersen
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.