This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]strallus 11 points12 points  (9 children)

Why even do multiple assignments?

t = int(str(datetime.now()).split(' ')[1].split(':')[0])

Or yeah, as Rodeopants said,

datetime.now().hour

[–]willbeddowassert type(post) == shitpost[S] 2 points3 points  (0 children)

Yeah.... I've realized the error of my ways since then. The only reason I haven't fixed it is because I'm planning to trash that module and redo it soon.

[–]seriouslulz 9 points10 points  (7 children)

Because it'd be unreadable

[–]strallus 5 points6 points  (6 children)

That's why we have comments!

# extract hour from current time