Spaces in file names are looking for troubles
See original GitHub issueWhat is the purpose of naming a file script (dev).tmpl
? Oh, I see, to prove that Setuptools can support funny file names. Great.
I read bug #134, and especially jaraco’s comment on Jan 3, 2016. There is a third principle, besides least astonishment and robustness, and it is the readability. As an invisible character, a space cannot be distinguished from other invisible characters, such as tab and a plethora of UTF-8 space variations. How easily can you tell script (dev).tmpl
from script (dev).tmpl
? (Hint: one of them has multiple spaces, but you need to inspect HTML code to tell). An accidental misspell can hardly catch your eyeballs.
Certainly, script-dev.tmpl
would have looked too simple, eh? So here’s a fourth principle, KISS.
The URI syntax (rfc3986) provides for a set of unreserved characters (ALPHA / DIGIT / "-" / "." / "_" / "~"
), whereby the rest, including spaces, has to be percent-encoded. What doddering fools!
Email syntax allows for spaces in the local-part of an email address, provided that spaces are quoted. However, SMTP wording is “a host that expects to receive mail SHOULD avoid [them]”.
Some SQL implementation provide for spaces in variable names. I’d guess you’re looking forward for the next version of Python to support a similar feature too, possibly varying quotation styles from a version to the next. Real progress, eh?
I hope I didn’t annoy you by re-opening a bug that you consider a feature. I guess I won’t be the last one, until you fix it.
Best Ale
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top GitHub Comments
Sorry, but spaces are valid in filenames and systems and tools should support them.
Have you considered renaming the file to
? I think, that will significantly increase the “strength” of this file.