def __len__(self):
        "value is approximate since .keys() drops non-string types"
        with _winreg.OpenKey(self._hive, self._key) as k:
            num_subkeys, num_values, t = _winreg.QueryInfoKey(k)
            return num_values
value is approximate since .keys() drops non-string types
recipes/Python/577381_collectionsMutableMapping_wrapper_around/recipe-577381.py