-
Notifications
You must be signed in to change notification settings - Fork 15
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
Naming bikeshedding thread #151
Comments
Regarding adding Error to exceptions: This is defined as common practice in the Python docs: https://docs.python.org/3/tutorial/errors.html#user-defined-exceptions, is often mentioned as convention: https://www.geeksforgeeks.org/python-naming-conventions/, https://stackoverflow.com/questions/2903827/why-are-python-exceptions-named-error and is also part of PEP8: https://peps.python.org/pep-0008/#exception-names I'm not convinced by I agree with the renaming of |
I think I think for importing/exporting to e.g. datetime another prefix should be used. |
other prefixes that are often used are 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. |
@JaykeMeijer Coming back to it, I'm not so sure about the try:
my_queue.pop()
except queue.Empty:
... similar to try:
local_time.assume_tz("US/Eastern", disambiguate="raise")
except SkippedTime:
... Note that the other exceptions, such as |
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: