[Python-ideas] Minimalist `except` syntax.

ryles rylesny at gmail.com
Mon Oct 19 12:07:38 CEST 2009


On Oct 18, 6:22 am, cool-RR <cool... at cool-rr.com> wrote:
> Often I do:
>
> try:
>     some_suite()
> except SomeError:
>     pass
>
> What I suggest is that instead we'll have this:
>
> try:
>     some_suite()
> except SomeError
>
> What do you think?
>

The explicit 'pass' improves readability by showing that the author
made a conscious decision to ignore the error. In the suggested form,
it looks more like the author took a coffee break in the middle of
coding.



More information about the Python-ideas mailing list