Posts by Leonardo Peixoto • 1 point
1 post
-
0
votes1
answer1174
viewsA: Ordering a list of objects by date
You can leave your class comparable to another by the date attribute. from functools import total_ordering from datetime import date @total_ordering class obj: def __init__(self, dia, mes, ano):…
python-3.xanswered Leonardo Peixoto 1