Message413731
Ok thanks. Looks like the warning in flake8-bugbear is the right place then, unfortunately.
And just to be sure:
> Note that suppress without arguments corresponds to "except" and isinstance() with empty tuple.
Are you saying that `contextlib.suppress()` should effectively `except BaseException` (cause this is not the behavior from my tests) and suppress all or suppress nothing? I believe the empty tuple makes it except nothing?
```python
cooper@home1:~$ python3.11
Python 3.11.0a5+ (main, Feb 22 2022, 08:51:50) [GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import contextlib
>>> with contextlib.suppress():
... raise ValueError("I raise ...")
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
ValueError: I raise ...
>>>
``` |
|
Date |
User |
Action |
Args |
2022-02-22 18:19:47 | cooperlees | set | recipients:
+ cooperlees, ncoghlan, zach.ware, serhiy.storchaka, yselivanov |
2022-02-22 18:19:47 | cooperlees | set | messageid: <1645553987.4.0.991357920297.issue46819@roundup.psfhosted.org> |
2022-02-22 18:19:47 | cooperlees | link | issue46819 messages |
2022-02-22 18:19:47 | cooperlees | create | |
|