On 07/29/2019 12:24 PM, Dominik Vilsmeier wrote:

I think the focus shouldn't be on whether such syntax is possibly confusing or 
not because

a) People will always remember that's *either* one way or the other

No, they won't.

b) It's actually pretty easy to remember which way it is, by just considering 
that a syntax feature exists for scenarios that can't be easily solved 
otherwise.

They also exist for scenarios that are easily resolved, but also easily gotten 
wrong:

  x += 1

instead of

  x = x + 1

I can easily see

  for this in some_iter:
      ...
  except ValueError():
      ..

as being syntactic sugar for

  for this in some_iter:
      try:
          ...
      except ValueError():
          ...

as it can easily save several levels of indenting.

--
~Ethan~
_______________________________________________
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/AVZALGGMB26JYA7OTWV4M46EJ5ZF7EFG/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to