| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Sorry, something went wrong.
|
For reference: I just signed the CLA a few minutes ago. |
Sorry, something went wrong.
`type(NotImplemented)` and `type(None)` have, respectively, been replaced with `types.NotImplementedType` and `types.NoneType`
There was a problem hiding this comment.
I've not done a thorough review yet. These comments are just about the blurb.
Sorry, something went wrong.
|
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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
@ericvsmith, what do you think? |
Sorry, something went wrong.
|
I do think it would be easier to review if they were moved to a separate PR, even if it's on the same bpo. |
Sorry, something went wrong.
Reverts python@2791a23 and python@0a97a88. Save this for a follow up.
The changes have been reverted as of 84ebe18. |
Sorry, something went wrong.
There was a problem hiding this comment.
I think the docs for the three special objects should not start with “The sole value of the type ...”.
The first sentence should serve as a brief summary of what the object is used for. You can then follow up with the detail about its singleton type.
Otherwise LGTM. Thanks for your patience!
Sorry, something went wrong.
There was a problem hiding this comment.
This looks good to me!
Sorry, something went wrong.
It's just mirroring the existing documentation for None. But I agree that moving the "the sole value" sentence (or sentence fragment) to the end of the description would be an improvement. |
Sorry, something went wrong.
|
I did not particularly want the change in IDLE, because 1) I am not sure I prefer it (partly because of the extra import) and I don't know that PEP-8 'mandates' it*, and 2) I cannot backport it to actively maintained 3.8 and 3.9 code, so it would cause a merge conflict if I patched that section of code. I checked that the latter seems unlikely in this particular case. I think the effort to 'sanitize' all existing code is futile, since people will continue to put type(None) in code. Consider leading existing code alone. |
Sorry, something went wrong.
There was a problem hiding this comment.
Approved, but only with misleading wording fixed.
Sorry, something went wrong.
| .. data:: None | ||
|
|
||
| The sole value of the type ``NoneType``. ``None`` is frequently used to | ||
| The sole value of the type :data:`types.NoneType`. ``None`` is frequently used to |
There was a problem hiding this comment.
"The sole value of the type NoneType" is most easily read (parsed) as referring to NoneType's usefulness. I expected it to be followed by 'is to ...' and initially read 'is frequently' as a grammatical error. It took awhile to realize that this is a convoluted way to say 'None'. I strongly recommend a rewording.
| The sole value of the type :data:`types.NoneType`. ``None`` is frequently used to | |
| ''None'' is the only instance of :data:`types.NoneType`. It is frequently used to |
types.NoneType is already twice identified as a type, so a third mention is not needed.
Sorry, something went wrong.
There was a problem hiding this comment.
Based on your and Guido's feedback (#22336 (review)) I'm proposing something like this:
.. data:: None An object frequently used to represent the absence of a value, as when default arguments are not passed to a function. Assignments to ``None`` are illegal and raise a :exc:`SyntaxError`. Sole instance of the :data:`types.NoneType` type.
Any thoughts?
Sorry, something went wrong.
There was a problem hiding this comment.
That's much better, I think. Although I'd make the last sentence (with the correct markup): "None is the sole instance of the NoneType type."
Sorry, something went wrong.
| Sole value of the type :data:`types.NotImplementedType` and a | ||
| special value which should be returned by the binary special methods |
There was a problem hiding this comment.
See above. Use a parallel construction.
| Sole value of the type :data:`types.NotImplementedType` and a | |
| special value which should be returned by the binary special methods | |
| ``NotImplemented is the only instance of :data:`types.NotImplementedType`. It is a | |
| special value which should be returned by the binary special methods |
Sorry, something went wrong.
| .. data:: Ellipsis | ||
|
|
||
| The same as the ellipsis literal "``...``". Special value used mostly in conjunction | ||
| The same as the ellipsis literal "``...``" and sole value of the type |
There was a problem hiding this comment.
| The same as the ellipsis literal "``...``" and sole value of the type | |
| The same as the ellipsis literal "``...``" and the only instance of |
Sorry, something went wrong.
|
|
||
| Reintroduced the :data:`types.EllipsisType`, :data:`types.NoneType` | ||
| and :data:`types.NotImplementedType` classes, providing a new set | ||
| of types readily interpretable by type checkers. |
There was a problem hiding this comment.
I think this and the blurb are fine, providing a reason without saying either that this is the only reason or that these should be use everywhere.
Sorry, something went wrong.
|
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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
|
@terryjreedy the documentation changes have been implemented as of 23ed559. |
Sorry, something went wrong.
* origin/master: (27 commits) bpo-41428: Fix compiler warnings in unionobject.c (pythonGH-22388) bpo-41654: Fix compiler warning in MemoryError_dealloc() (pythonGH-22387) bpo-41833: threading.Thread now uses the target name (pythonGH-22357) bpo-30155: Add macros to get tzinfo from datetime instances (pythonGH-21633) bpo-33822: Update IDLE section of What's New 3.8 (pythonGH-22383) bpo-41844: Add IDLE section to What's New 3.9 (GN-22382) bpo-41841: Prepare IDLE News for 3.10 (pythonGH-22379) bpo-37779 : Add information about the overriding behavior of ConfigParser.read (pythonGH-15177) bpo-40170: Use inline _PyType_HasFeature() function (pythonGH-22375) bpo-40941: Fix stackdepth compiler warnings (pythonGH-22377) bpo-40941: Fix fold_tuple_on_constants() compiler warnings (pythonGH-22378) bpo-40521: Fix PyUnicode_InternInPlace() (pythonGH-22376) bpo-41834: Remove _Py_CheckRecursionLimit variable (pythonGH-22359) bpo-1635741, unicodedata: add ucd_type parameter to UCD_Check() macro (pythonGH-22328) bpo-1635741: Port _lsprof extension to multi-phase init (PEP 489) (pythonGH-22220) bpo-41513: Improve order of adding fractional values. Improve variable names. (pythonGH-22368) bpo-41816: `StrEnum.__str__` is `str.__str__` (pythonGH-22362) bpo-35764: Rewrite the IDLE Calltips doc section (pythonGH-22363) bpo-41810: Reintroduce `types.EllipsisType`, `.NoneType` & `.NotImplementedType` (pythonGH-22336) bpo-41602: raise SIGINT exit code on KeyboardInterrupt from pymain_run_module (python#21956) ...
…mentedType` (pythonGH-22336) closes issue 41810
| Back | FazBrowse Home | New Git URL |
See the relevant BPO for more details: https://bugs.python.org/issue41810.
https://bugs.python.org/issue41810