GeezerVison is showing github.com — datetime.isoformat() docstring has a typo · Issue #135956 · python/cpython
datetime.isoformat() docstring has a typo #135956DescriptionDocumentation
In 3.13 cpython/Lib/_pydatetime.py line 2046-2047, linked below, the docstring has a typo. It repeats the word "giving".
|
If self.tzinfo is not None, the UTC offset is also attached, giving |
|
giving a full format of 'YYYY-MM-DD HH:MM:SS.mmmmmm+HH:MM'. |
Linked PRs
Activityterryjreedy commented on Jun 25, 2025 Still in main. Preparing PR. brianschubert commented on Jun 25, 2025 A quick regex search for \b(\w+)\b *\n *\1\b shows that this is the only such case in Lib/ public docstrings terryjreedy commented on Jun 26, 2025 @jason-mcgowan Thanks for catching this. @brianschubert Thanks for checking for more. Others have done this before, so I am surprised that this one got missed. Maybe just an oversight in the last round. StanFromIreland commented on Jun 26, 2025 Other occurrences, limited to triple quoted docstrings, omitting tests, as I was getting too much noise otherwise:
Private:
./Lib/asyncio/base_events.py:"""Prepare the run loop to process events.
This method exists so that custom custom event loop subclasses (e.g., event loops
that integrate a GUI event loop with Python's event loop) have access to all the
loop setup logic.
""".
./Lib/asyncio/base_events.py:"""Clean up after an event loop finishes the looping over events.
This method exists so that custom custom event loop subclasses (e.g., event loops
that integrate a GUI event loop with Python's event loop) have access to all the
loop cleanup logic.
"""
./Lib/idlelib/editor.py:"""Return 2 lines containing block opener and and indent.
Either the indent line or both may be None.
"""
Public:
./Lib/unittest/mock.py:"""assert that the mock was called exactly once and that that call was
with the specified arguments."""LamentXU123 commented on Jun 26, 2025
Other occurrences, limited to triple quoted docstrings, omitting tests, as I was getting too much noise otherwise:
Private:
./Lib/asyncio/base_events.py:"""Prepare the run loop to process events.
This method exists so that custom custom event loop subclasses (e.g., event loops
that integrate a GUI event loop with Python's event loop) have access to all the
loop setup logic.
""".
./Lib/asyncio/base_events.py:"""Clean up after an event loop finishes the looping over events.
This method exists so that custom custom event loop subclasses (e.g., event loops
that integrate a GUI event loop with Python's event loop) have access to all the
loop cleanup logic.
"""
./Lib/idlelib/editor.py:"""Return 2 lines containing block opener and and indent.
Either the indent line or both may be None.
"""
Public:
./Lib/unittest/mock.py:"""assert that the mock was called exactly once and that that call was
with the specified arguments."""
Great! May I include this in #135964? LamentXU123 commented on Jun 28, 2025 Hi, @StanFromIreland friendly pinging here. These typos you've mentioned are still in the main branch, would you like me to open a PR to fix it? StanFromIreland commented on Jun 28, 2025 You can fix the public one if you wish, though it's not high priority, I'm 0 on the others. LamentXU123 commented on Jun 28, 2025
You can fix the public one if you wish, though it's not high priority, I'm 0 on the others.
Sure! #136067
MetadataMetadataStatusShow more project fields StatusShow more project fields
DevelopmentNo branches or pull requestsIssue actions
|