Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-9305: Remove east/west references from datetime #31697

Closed
wants to merge 5 commits into from

Conversation

slateny
Copy link
Contributor

@slateny slateny commented Mar 5, 2022

@slateny slateny changed the title bpo-9305: Removed east/west references from datetime bpo-9305: Remove east/west references from datetime Mar 9, 2022
Modules/_datetimemodule.c Outdated Show resolved Hide resolved
Modules/_datetimemodule.c Outdated Show resolved Hide resolved
@rhettinger
Copy link
Contributor

I understand what this PR is trying to do but think it makes users worse off. For the most part, people understand the UTC offset sign conventions in terms of being east or west of the prime meridian. While this isn't 100% true, it is a good approximation and mental model.

It would be better to leave the East/West positive/negative references in place and just add a note somewhere in the docs explaining the exceptions to the rule.

@slateny
Copy link
Contributor Author

slateny commented Apr 25, 2022

Hmm, for the docs, what about instead adding an east/west note on the timedelta object, something like:

'if the time being compared is east of UTC, timedelta is positive. If west of UTC, then timedelta is negative'

and keeping the east/west removal under the offset function? This way, other functions that refer to timedelta (like dst(), which doesn't have anything on east/west, but do in the docstring) can all refer to one spot.

Regarding the docstrings, I'm pretty indifferent and would be fine with keeping east/west as-is if it reads better there.

Copy link
Contributor

@MaxwellDupre MaxwellDupre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test_datetime produces:
Ran 960 tests in 10.108s
OK (skipped=28)
Also, the Docs for datetime is readable and concise.

@rhettinger
Copy link
Contributor

I'm going to mark this as closed, but another core dev can reopen if they feel strongly about it.

AFAICT no reported user problem is being solved here. IMO it is a nitpick that while technically correct will make the docs less usable. People do mentally time offsets with east and west. That is a useful first approximation.

To misquote Kronecker, "god created the east/west timezone offsets, the rest of the funky timezone lines are the work of man." ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants