Have UserDict.__init__() implicitly check for updating w/ bool(kwargs) instead of len() (GH-12139)
Semantically the same, but more idiomatic by checking against `kwargs` instead of `len(kwargs)`.
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py
index cff75a4..9657c1c 100644
--- a/Lib/collections/__init__.py
+++ b/Lib/collections/__init__.py
@@ -1016,7 +1016,7 @@
self.data = {}
if dict is not None:
self.update(dict)
- if len(kwargs):
+ if kwargs:
self.update(kwargs)
def __len__(self): return len(self.data)
def __getitem__(self, key):