>>> from datetime import date>>>>>> repr(date.today()) # calls date.today().__repr__()'datetime.date(2009, 1, 16)'>>> eval(_) # _ is the output of the last commanddatetime.date(2009, 1, 16)
输出是可以由python解释器解析的字符串,并导致一个相等的对象。
如果无法实现,则应以的形式返回字符串
<...some useful description...>。



