semi colonic

Dieter Maurer dieter at handshake.de
Thu Feb 23 13:17:03 EST 2023


Thomas Passin wrote at 2023-2-22 21:04 -0500:
>On 2/22/2023 7:58 PM, avi.e.gross at gmail.com wrote:
> ...
>> So can anyone point to places in Python where a semicolon is part of a best
>> or even good way to do anything?
>
>Mostly I use it to run small commands on the command line with python
>-c.  e.g.
>
>python -c "import sys;print('\n'.join(sys.path))"
>
>This is handy enough that I wouldn't like to do without.
>
>Another place I use the semicolon (once in a while) is for quick
>debugging.  I might add as line like, perhaps,
>
>import os; print(os.path.exists(filename))

I also see, `;` occasionally in `*.pth` files.


More information about the Python-list mailing list