| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 17499d8 commit 009ef29
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2155,8 +2155,10 @@ through the container; for mappings, :meth:`__iter__` should be the same as | |||
| 2155 | 2155 | ||
| 2156 | 2156 | Called to implement :func:`operator.length_hint`. Should return an estimated | |
| 2157 | 2157 | length for the object (which may be greater or less than the actual length). | |
| 2158 | - The length must be an integer ``>=`` 0. This method is purely an | ||
| 2159 | - optimization and is never required for correctness. | ||
| 2158 | + The length must be an integer ``>=`` 0. The return value may also be | ||
| 2159 | + *NotImplemented*, which is treated the same as if the ``__length_hint__`` | ||
| 2160 | + method didn't exist at all. This method is purely an optimization and is | ||
| 2161 | + never required for correctness. | ||
| 2160 | 2162 | ||
| 2161 | 2163 | .. versionadded:: 3.4 | |
| 2162 | 2164 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments