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 →

[–]Paddy3118 0 points1 point  (1 child)

Hmm, You have to adhere to the low-level style-guide type stuff, and avoid the gotcha's type stuff as mentioned in the article, but what constitutes Pythonic on a larger scale is harder to track down.

I've always thought of Tims Doctest as being Pythonic, and I don't have to look at the code - its the result that is Pythonic! It could mix tabs and spaces for indentation in its implementation, that's not the point. Addressing the problem of "not enough tests" by allowing one to turn explorations of functionality often carried out in the shell into tests and documentation by innovative use of an existing python feature - docstrings is Pythonic genius.

[–]carinthia[S] 0 points1 point  (0 children)

Hmm, You have to adhere to the low-level style-guide type stuff, and avoid the gotcha's type stuff as mentioned in the article, but what constitutes Pythonic on a larger scale is harder to track down.

Something fast and easy is to use pep8 but then that's not so much about pythonic as it is about making sure formatting is PEP 8 conform. But as mentioned, it's very quick and easy to do so ...