mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
GH-84976: Re-introduce datetime.py
and fix reprs
Without the change to the reprs, pure-python classes would have a repr of `datetime._pydatetime.time`, etc.
This commit is contained in:
parent
65c4a2b326
commit
0a5cd984b2
3 changed files with 27 additions and 29 deletions
9
Lib/datetime.py
Normal file
9
Lib/datetime.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
try:
|
||||
from _datetime import *
|
||||
from _datetime import __doc__
|
||||
except ImportError:
|
||||
from _pydatetime import *
|
||||
from _pydatetime import __doc__
|
||||
|
||||
__all__ = ("date", "datetime", "time", "timedelta", "timezone", "tzinfo",
|
||||
"MINYEAR", "MAXYEAR")
|
Loading…
Add table
Add a link
Reference in a new issue