On 03/08/2017 08:01 AM, Francesco Franchina wrote:

Before expressing my thought and proposal, I want to make sure we all agree on 
a simple and clear fact:
the __str__ magic method is used to give a literal and human-readable 
representation to the object (unlike __repr__).

If __str__ has not been defined, then __repr__ is used instead.

time.struct_time(tm_year=2017, tm_mon=3, tm_mday=8, tm_hour=16, tm_min=6, 
tm_sec=16, tm_wday=2, tm_yday=67, tm_isdst=0)

Which is what that looks like.

--
~Ethan~

_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to