Short syntax for try/pass
ned at nedbatchelder.com
Tue Oct 14 16:28:11 CEST 2014
On 10/14/14 10:08 AM, Leonardo Giordani wrote:
> Would it be feasible to propose a short syntax like this?
> pass SomeException:
> where the above example would become:
> pass IndexError:
> lst = lst + 1
> I could not find if such a syntax has been already discussed elsewhere,
> so please let me know if this is the case.
> Otherwise, what do you think about it?
PEP 463 proposes a short syntax for this use case:
I'm not sure what became of it.
Ned Batchelder, http://nedbatchelder.com
More information about the Python-list