Dec-24-2017, 04:05 AM
Quote:the reason i do this is because it fits more code per page, which makes it easier (for me) to read what im doing.Its easier for me to read without semi-colons.
In fact when i copy and fix someones code on the forum, i go through and remove the semi-colons as they bug me before i post it back on the forum.
It even bugs me that there was a space between print and the pareth
print(5) print(12)To me its better to have readability even at the expense of speed...which in that case does not.
But it can in list comps. I would say that its better to "unpack" list comps that are long and complicated to regular for loops for the same reason. Its better to be able to read it. And the speed increase is probably not worth it.
Same thing about regex. Some are simple and too simple that python has builtins for. Its easier to read without using regex in most cases. But yes, sometimes you just have to live with regex though.
for numerous imports i would do
from .states import ( stats_screen, blackjack, craps, bingo, keno, video_poker )instead of spreading them off in a one liner.
The zen of python states...
Quote:Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Recommended Tutorials: