You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an issue to gather bikeshedding discussion about names. To keep churn minimal, any renames will be bundled as much as possible into a small number of releases.
Here are naming discussions. Items are only checked off when a decision has been made.
Comments are welcomed, but note that decisions are not (necessarily) made by majority vote
add Error suffix to exceptions: SkippedTime -> SkippedTimeError (and others)
rename py_datetime() to stdlib_datetime(), perhaps adding the to_ prefix?
Rename local() and instant() to to_local() and to_instant(). The original rationale was the the other to_* methods convert between "aware" types, while conversion to local or instant is more fundamental.
...
The text was updated successfully, but these errors were encountered:
I'm not convinced by stdlib_datetime(). Although it covers what it does, stdlib is not a term I'm used to seeing in a Python context and I might think it has something to do with some underlying/referenced C object. Looking at the next item on the list, should it include to_? Would to_datetime be too confusing? Perhaps to_python_datetime, to_standard_datetime or to_native_datetime?
I agree with the renaming of local() and instant()
I think to_local() and to_instant() makes sense because it changes the reference to another reference.
I think for importing/exporting to e.g. datetime another prefix should be used.
How about create_datetime() or create_py_datetime()
I don't mind the exact naming, I think the important part is that it's possible to differentiate a conversion from a shift of the reference.
other prefixes that are often used are as_* or into_*, or in_*.
I'm a bit on the fence about mixing different styles of prefix. On the one hand, it can distinguish different 'flavors', but on the other hand, having one prefix is easier to discover. Realistically, most people will just type "to" in their IDE and read the list to see what the possible conversions are. They will just be confused why a different naming convention exists elsewhere.
This is an issue to gather bikeshedding discussion about names. To keep churn minimal, any renames will be bundled as much as possible into a small number of releases.
Here are naming discussions. Items are only checked off when a decision has been made.
Comments are welcomed, but note that decisions are not (necessarily) made by majority vote
Error
suffix to exceptions:SkippedTime
->SkippedTimeError
(and others)py_datetime()
tostdlib_datetime()
, perhaps adding theto_
prefix?local()
andinstant()
toto_local()
andto_instant()
. The original rationale was the the otherto_*
methods convert between "aware" types, while conversion to local or instant is more fundamental.The text was updated successfully, but these errors were encountered: