Conversation
| sys.stdout.flush() | ||
|
|
||
|
|
||
| def getCurrentTime(): |
There was a problem hiding this comment.
The intermediate variables don't help here.
Also, it's "time"!
return datetime.now().strftime(TIME_FORMAT), where TIME_FORMAT is some constant at the top of the file.
| return current_time | ||
|
|
||
|
|
||
| def splitTimeString(timeStr: list): |
There was a problem hiding this comment.
This is much too short to be a function.
Also, the type isn't right, it should be str, and what's with all the mixEdCaseStuff, this isn't Java!
| clear_terminal() | ||
| while True: | ||
| raw_time_string = getCurrentTime() | ||
| [hour, minute, second] = [nmr.str_to_name( |
There was a problem hiding this comment.
So this doesn't actually work.
What you are actually doing is this:
- Splitting time into numbers
- Independently converting each number to a name
- Printing it
But this gives the same name to the same time each day - and it isn't actually dealing with any of the issues.
| time.sleep(1) | ||
|
|
||
|
|
||
| def clear_terminal(): |
There was a problem hiding this comment.
If you were using textual, this wouldn't be needed.
There was a problem hiding this comment.
Oh, thanks a bunch!
Without using any additional or "time-specific logic", this is what my first go at it looked like.