[#8530] convert dict.has_key

Redundant with `in` and removed from Python 3.

Removed odd, old and long-unused UpdatableDict (which defines and uses
has_key) and UpdatableStr (which was nearby and caught in the blast),
validated with al.

(lib2to3.fixes.fix_has_key)
This commit is contained in:
Xavier Morel
2017-04-11 17:04:45 +02:00
parent 3f20662b3e
commit 578b0ef2fd
7 changed files with 23 additions and 130 deletions
+11
View File
@@ -98,3 +98,14 @@ Removed Operators
These two operators were long recommended against/deprecated in Python 2,
Python 3 removed them from the language.
Removed/renamed methods
-----------------------
.. important::
* the ``has_key`` method on dicts must be replaced by use of the ``in``
operator e.g. ``foo.has_key(bar)`` becomes ``bar in foo``.
``in`` for dicts was introduced in Python 2.3, leading to ``has_key`` being
redundant, and removed in Python 3.