This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients rhettinger
Date 2020-05-08.19:08:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588964937.68.0.986339822686.issue40568@roundup.psfhosted.org>
In-reply-to
Content
It would be nice to write this:

    $ python -c 'from math import *' 'print(e**(1j * pi))'

Instead of this:

    $ python -c 'from math import *; print(e**(1j * pi))'
    (-1+1.22464679915e-16j)

That would also make it possible input an indented block:

    $ python -c 'with open("somefile.txt") as f:'  '  s = f.read()' '  print(len(s))'

This feature would be especially useful in bash scripts.

FWIW, the timeit module already supports this convenience:

    $ python -m timeit -s 'from math import sqrt' -s 'x = 5' 'y = x ** 2' 'z = sqrt(y)'
    10000000 loops, best of 3: 0.0819 usec per loop
History
Date User Action Args
2020-05-08 19:08:57rhettingersetrecipients: + rhettinger
2020-05-08 19:08:57rhettingersetmessageid: <1588964937.68.0.986339822686.issue40568@roundup.psfhosted.org>
2020-05-08 19:08:57rhettingerlinkissue40568 messages
2020-05-08 19:08:55rhettingercreate