[docs] horrible example for shlex .... rm -rf?

Mariatta Wijaya mariatta.wijaya at gmail.com
Fri Dec 28 00:33:46 EST 2018


I think the example of `rm -rf` was chosen mainly to demonstrate that it is
unsafe, and therefore you need to use shlex.quote.

But if people can recommend another example that is not as severe as `rm
-rf`, perhaps we can consider changing it.

On Thu, Dec 27, 2018, 6:30 PM Carlo Lam <calam12 at gmail.com wrote:

> Hello Python Docs,
>
> I am no expert of python, but i do know linux quite a bit, and I was
> astonished to see that you show as example a rm -rf ~ , i will suggest to
> perhaps find a better example as this could be terrible for someone who
> does not know linux either.
>
> https://docs.python.org/3/library/shlex.html
> look in the quote example.
>
> Thank you,
> Carlo
> _______________________________________________
> docs mailing list
> docs at python.org
> https://mail.python.org/mailman/listinfo/docs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20181227/ce100ac0/attachment.html>


More information about the docs mailing list