[Python-ideas] Better comand line version of python -c
jeanpierreda at gmail.com
Fri Jan 9 00:53:21 CET 2015
On Thu, Jan 8, 2015 at 3:14 PM, Russell Stewart
<Russell.S.Stewart at gmail.com> wrote:
> Originally, I didn't want to name this -f because I didn't want the active
> variable x to be magically introduced. When you type -fx, its clear where
> the variable x comes from. This was probably a mistake, because everyone
> hates 2 character single-dash flags. Should be changed in the case of an
> overhaul. This command is also only marginally useful, due to the fact that
> grep already handles this use case so well, and because you can get the
> functionality with py -x 'x if foo(x) else None' just as well.
You can make -f a flag that takes one mandatory argument. This lets
people do -fy too.
More information about the Python-ideas