bpo-30978: str.format_map() now passes key lookup exceptions through.#2790
Conversation
|
@serhiy-storchaka, thanks for your PR! By analyzing the history of the files in this pull request, we identified @ericvsmith, @pitrou and @doerwalter to be potential reviewers. |
A test fails:ERROR: test_match_getitem (test.test_re.ReTests) Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/test_re.py", line 472, in test_match_getitem IndexError: no such group You should document this behaviour change in the NEWS entry (and fix the test). |
|
Other than the failing test in test_re, this looks good to me. |
vstinner
left a comment
There was a problem hiding this comment.
Thanks, it's now better with NEWS describing the old behaviour ;-)
| @@ -1 +1,2 @@ | |||
| str.format_map() now passes key lookup exceptions through. | |||
| Previousle any exception was replaced with a KeyError exception. | |||
There was a problem hiding this comment.
Typo: Previousle -> Previously
…rough. (pythonGH-2790) Previously any exception was replaced with a KeyError exception. (cherry picked from commit 5075416)
|
GH-2992 is a backport of this pull request to the 3.6 branch. |
No description provided.