5 ms·
PHP may have its flaws, but Python does not seem to be the answer either. By the way, have they already found a fail-safe way to visually represent the differen
by eriksank 14y ago
PHP may have its flaws, but Python does not seem to be the answer either. By the way, have they already found a fail-safe way to visually represent the difference between a space and a tab? Since space is a keyword and a tab too, how does the programming with invisible differences in whitespace combinations work? Does it already support all possible unicode whitespace? I guess I should ask a high priest in Python whitespace calculus ... Why not simplify the whole thing and use brainfuck characters instead?
- VMG 14y agoThis must be the weirdest complaint about Python I've heard so far.
- andybak 14y agoNo one who actually uses Python has any day to day problems with white space. Actually had one myself yesterday. Took me seconds to fix and was notable only because it was such a rare event.
- sejje 14y agoI still have whitespace problems occasionally, though I know they're my fault and come from my bad setup. Basically, my windows install of Vim and my *nix install are not using the same whitespace settings, and I sometimes have to fix a bunch of lines if I wrote them first in windows. It happens infrequently enough that I haven't bothered to figure out exactly what the problem is, but I've been coding python for years without drilling this one down.
- smsm42 14y agoI do use python for work from time to time (not every day, but probably every week) and I still occasionally have problems with whitespace. It's one of the most annoying things with Python, especially if editing somebody else's code or working in foreign environment (another machine, etc.) where tools aren't configured in your standard way.
- andybak 14y agoPEP8: "Use 4 spaces per indentation level." If you're getting code from someone else in your company which doesn't, just hit them round the head with PEP8 until they learn.
- smsm42 14y agoIt's easy to write a PEP, it's less easy to configure every editor in existence to use exactly 4 spaces, especially when normal humans prefer hitting tab once instead of hitting space 4 times.
- klibertp 14y agoYeah, they found a good way of dealing with whitespace - it's generally done by not using notepad for editing source code and/or learning about 'expand' command in *nixes.
- mikeash 14y agoGenerally one refrains from mixing tabs and spaces within the same file.