On Fri, Sep 18, 2020 at 8:54 AM Ben Rudiak-Gould <[email protected]> wrote:
>
> This is a terrible idea.
>
> No one should ever be trying to extract data from strings that are obviously 
> meant for human consumption, like "It is 11:45 PM".
>
> I'll grant you that it's sometimes necessary. But it needs to be approached 
> very carefully. You need to use a --porcelain flag if available, you need to 
> check that the actual output format matches what you expect, and you 
> definitely need to be able to specify where substring matching stops in more 
> ways than "int or float or string".
>
> The last thing Python needs is a built-in language feature that makes hacking 
> together these sorts of parsers seem easy and fun. Especially when it has no 
> way to control backtracking or to specify any but a few trivial restrictions 
> on what can end up in the output variables.
>

Python is an excellent language for text manipulation, and text
manipulation is an incredibly useful real-world operation. I don't see
what you're complaining at.

ChrisA
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/6AEECL4R5N5UWAU4FPUTH7GIQL5733SI/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to