-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Trivial - P5
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
As reported in PYTHON-1762, the default of 0 is confusing. It implies that by default you get no results, or at the very least that it's possible to get no results on purpose. In reality 0 means "all results" in MongoDB. Let's change PyMongo's default to None, and change the validator to require a non-zero value (negative values are also valid, for backward compatibility with pre-3.4 versions of MongoDB) to make it clear you can't request 0 results.
This is a backward breaking change since 0 has been the default since the very first version of PyMongo. We can't make this change until 4.0.
- is related to
-
PYTHON-1762 Document that limit=0 (the default) is equivalent to setting no limit
- Closed