On Fri, May 30, 2014 at 4:20 PM, Steven D'Aprano
<steve+comp.lang.pyt...@pearwood.info> wrote:
>> It's on par with creating a file with a name beginning with a
>> hyphen, and then fiddling around with various commands as you try to
>> manipulate it (tip: "rm ./-r" works); programs will happily interpret
>> "-r" as an option rather than a file name, without being concerned that
>> it's technically legal.
>
> I don't see any connection between the two.

-r is a valid file name, just as . is a valid line of input. But with
the rm command, you can't provide it with -r as a file name - you have
to use ./-r or somesuch, because the parser gets to it first. That's
the connection.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to