Loading...
Searching...
No Matches
pyregfi._GenericList Class Reference

Abstract class for ValueList and SubkeyList. More...

Inheritance diagram for pyregfi._GenericList:
[legend]

## Public Member Functions

| __len__ (self)
| Length of list.
| __getitem__ (self, name)
| Retrieves a list element by name.
| get (self, name, default)
| Fetches the requested element by name, or the default value if the lookup fails.

## Detailed Description

Abstract class for ValueList and SubkeyList.

## Member Function Documentation

## __getitem__()

pyregfi._GenericList.__getitem__ | ( |  | self,
|  |  | name
| ) |  |

Retrieves a list element by name.

Parameters

  name | The name of the subkey or value desired. This is case-insensitive.

Note
  The registry format does not inherently prevent multiple subkeys or values from having the same name, having a key and a value with the same name, or having the same name in different cases that could both match. This interface simply returns the first match in the list. Lookups using this method could also fail due to incorrectly encoded strings stored as names. To identify any duplicates or elements with malformed names, use the iterator interface to check every list element.

Returns
  the first element whose name matches, or None if the element could not be found

References pyregfi._GenericList._constructor, pyregfi.Value._constructor, pyregfi._GenericList._find_element, pyregfi.SubkeyList._find_element, pyregfi.ValueList._find_element, pyregfi._GenericList._get_element, pyregfi.SubkeyList._get_element, pyregfi.ValueList._get_element, pyregfi._StructureWrapper._hive, pyregfi.Security._hive, pyregfi._GenericList._hive, pyregfi.Key._hive, pyregfi.HiveIterator._hive, and pyregfi._GenericList._key_base.

The documentation for this class was generated from the following file:

- __init__.py