Timeline for Create a Time class - OOP in Python
Current License: CC BY-SA 4.0
14 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 24, 2021 at 9:49 | comment | added | Alex Waygood | Also worth noting that it's probably best to raise a TypeError in such methods, rather than using assert. assert is basically only used for tests/debugging, as you can run python in "all asserts silenced mode", which is sometimes done for optimisation purposes. stackoverflow.com/questions/1273211/… | |
| Jul 22, 2021 at 19:02 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Jun 22, 2021 at 19:35 | comment | added | Miguel Alorda | One comment is, whenever you are implementing either of the comparison operators, you need to make sure you always implement them all. This would be, <, <=, >, >=, == and !=. Otherwise, the whoever used your Time class might run into trouble during comparisons without noticing. | |
| Jun 22, 2021 at 18:10 | history | edited | vnp | CC BY-SA 4.0 | added 2 characters in body |
| Jun 22, 2021 at 16:50 | answer | added | Toby Speight | timeline score: 1 | |
| Jun 22, 2021 at 16:37 | history | edited | Reinderien | edited tags | |
| Jun 22, 2021 at 16:27 | history | edited | Sᴀᴍ Onᴇᴌᴀ♦ | edited tags | |
| Jun 22, 2021 at 16:25 | comment | added | KermitTheFrog | Well you know, sometimes (because its a task for school) I also don't see any sense in creating such complicated and thus simple things, but yeah, here we are! :D | |
| Jun 22, 2021 at 16:23 | history | edited | Toby Speight | edited tags | |
| Jun 22, 2021 at 16:23 | comment | added | Toby Speight | That's fine - the code just pretends leap seconds don't exist. I'm poking fun a little, but also pointing out that real date-time code has a lot of awkward real-world stuff to deal with, so better using the libraries than writing your own for actual use. | |
| Jun 22, 2021 at 16:21 | comment | added | KermitTheFrog | um raise a wrongseconds/wrongminutes error i guess | |
| Jun 22, 2021 at 16:21 | history | edited | Toby Speight | CC BY-SA 4.0 | Deprettify the non-code |
| Jun 22, 2021 at 16:19 | comment | added | Toby Speight | If you can't represent the 61st second of a minute, what's supposed to happen when there's a leap second?? | |
| Jun 22, 2021 at 16:11 | history | asked | KermitTheFrog | CC BY-SA 4.0 |