📅  最后修改于: 2022-03-11 14:45:03.224000             🧑  作者: Mango
>>> from datetime import datetime
>>> datetime
>>> datetime.datetime(2001,5,1) # You shouldn't expect this to work
# as you imported the type, not the module
Traceback (most recent call last):
File "", line 1, in
AttributeError: type object 'datetime.datetime' has no attribute 'datetime'
>>> datetime(2001,5,1)
datetime.datetime(2001, 5, 1, 0, 0)