MCPcopy Index your code
hub / github.com/python/cpython / enum_types

Method enum_types

Lib/mimetypes.py:294–304  ·  view source on GitHub ↗
(mimedb)

Source from the content-addressed store, hash-verified

292 @classmethod
293 def _read_windows_registry(cls, add_type):
294 def enum_types(mimedb):
295 i = 0
296 while True:
297 try:
298 ctype = _winreg.EnumKey(mimedb, i)
299 except OSError:
300 break
301 else:
302 if '\0' not in ctype:
303 yield ctype
304 i += 1
305
306 with _winreg.OpenKey(_winreg.HKEY_CLASSES_ROOT, '') as hkcr:
307 for subkeyname in enum_types(hkcr):

Callers

nothing calls this directly

Calls 1

EnumKeyMethod · 0.80

Tested by

no test coverage detected