[Python-ideas] shlex escapes without Posix mode

Steven D'Aprano steve at pearwood.info
Fri Jul 26 05:35:15 CEST 2013


Hi Ryan, and welcome.


On 26/07/13 05:22, Ryan wrote:
> Note: This is my first post to the mailing list, so I'm not sure if I'm doing something wrong or something.
>
> I've been playing around with shlex.lately, and I mostly like it, but I have an idea.
>
> Have an option with the ability to enable certain Posix mode features selectively, most particularly character escapes. It could be something like, if Posix mode is disabled, the string of escape characters is set to empty or None, and assigning a value to it enables that feature in non-Posix mode.


That's a good start, but it's awfully vague. "Something like"? Concrete ideas will help. Actual working code is best (although be cautious about posting large amounts of code here -- a few lines is fine, pages of code, not so much), or at least pseudo-code demonstrating how and when somebody might use this proposed feature.

Good use-cases for why you might want the feature also helps. Under what circumstances would you say "Well, I don't want POSIX mode, but I do want POSIX escape sequences"?

Ultimately, don't be surprised or disappointed at negative reactions. Negative reactions are better than silence -- at least it means that people have read, and care enough to comment, on your post, while silence may mean that nobody cares, or simply don't understand what you're talking about and are too polite to say so.

We tend to be rather conservative about adding new features. Sometimes it takes *years* for features to be added, or they are never added, if nobody who cares about the feature steps up to program it. Remember too that new code has to carry its weight: code not only has one-off costs (code doesn't write itself, neither does the documentation), but also on-going costs (maintenance, bug-fixes, new features for users to learn, etc.), and no matter how low that cost is, it is never zero, so if the benefit from that feature is not more than the cost, it will probably be rejected.

Two good posts you should read, by one of the senior core developers, are:

http://www.boredomandlaziness.org/2011/04/musings-on-culture-of-python-dev.html

http://www.boredomandlaziness.org/2011/02/status-quo-wins-stalemate.html


If you take nothing else from my reply, at least take from it these two questions:

"Under what circumstances would this feature be useful to you? And would they be useful enough that you personally would program this feature, if you had the skills?"



-- 
Steven


More information about the Python-ideas mailing list