On Sun, Feb 7, 2021 at 12:37 AM Jonathan Crall <erote...@gmail.com> wrote:

> a with directly after an if costs me 8 spaces instead of 4.\
>

Frankly, I think many (most) uses of with are a waste of an indentation
level. For example, if all I'm doing is opening a file -- that isn't
"logically" a separate block.

In fact, I find myself reading entire files into memory and then processing
them, so as to avoid having to extra-indent all the processing code.

The point being that the problem is not with "if" not having a feature, but
with with (heh, heh) itself in many contexts.

All that being said, it's not that big a deal, and I personally don't try
to limit to 80 chars per line anyway -- preferring 90 or 95 -- I haven't
used a VT100 in decades ....

It's the price we pay for nifty feature.

-Chris B

PS -- your linter will yell at you, but you COULD simply use 2 spaces for a
if:with combo.


-- 
Christopher Barker, PhD (Chris)

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/RS4ZUOB45JBGBAPSPDSHYWF5SZRKYJFK/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to