diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:09:03 +0100 |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:09:03 +0100 |
commit | 2a1d833d5da7fa7a01a2eef183b0a208ed019427 (patch) | |
tree | 8da3ebb695ae55c69d0a58691403fb13d96a9476 /Lib/string.py | |
parent | c6180bb73c8c7c7f9d8ea9816487b710597b6fc1 (diff) | |
parent | bbd3587a29510bd5a318e0a19fc8570c0cd3b622 (diff) | |
download | cpython-2a1d833d5da7fa7a01a2eef183b0a208ed019427.tar.gz |
Merge issue #26355 fix from 3.6
Diffstat (limited to 'Lib/string.py')
-rw-r--r-- | Lib/string.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Lib/string.py b/Lib/string.py index c902007643..bc9508c1e6 100644 --- a/Lib/string.py +++ b/Lib/string.py @@ -175,14 +175,8 @@ class Formatter: try: format_string, *args = args # allow the "format_string" keyword be passed except ValueError: - if 'format_string' in kwargs: - format_string = kwargs.pop('format_string') - import warnings - warnings.warn("Passing 'format_string' as keyword argument is " - "deprecated", DeprecationWarning, stacklevel=2) - else: - raise TypeError("format() missing 1 required positional " - "argument: 'format_string'") from None + raise TypeError("format() missing 1 required positional " + "argument: 'format_string'") from None return self.vformat(format_string, args, kwargs) def vformat(self, format_string, args, kwargs): |