Hacker News new | past | comments | ask | show | jobs | submit login

This is bad Python:

- "isgoodtime" is a magic variable that changes depending on when it is imported. It should therefore be either a function or method on an object.

- "if isgoodtime == True" should be "if isgoodtime:" (although this would probably change to "if isgoodtime():"

- words in functions should be separated by underscores, e.g., is_good_time, to_great_content




Oh my god it's TERRIBLE Python, it's just a joke. Theoretically I have "written" is good time in another file and imported it here, checking to see if datetime.datetime(datetime.now()) is in a good time, but I just wanted to write it so it was understandable as a joke.

Also, I'm just terrible at writing code. See previous post on tommy.authpad.com


Yeah, I know. As a Python guy with a minor case of OCD, I sometimes feel compelled to critique code, even when I know the code was written in jest.

Sorry for being a pedant :)


You're a gentleman and a scholar, keep fighting the good fight.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: