def __init__(self,name,parent,sam=KEY_READ,hkey=None):
names = [nm for nm in name.split("<STR_LIT:\\>") if nm]<EOL>if len(names) == <NUM_LIT:0>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>for pname in names[:-<NUM_LIT:1>]:<EOL><INDENT>parent = Key(pname,parent)<EOL><DEDENT>self.name = names[-<NUM_LIT:1>]<EOL>self.parent = parent<EOL>self.sam = sam<EOL>if hkey is not None:<EOL><INDENT>self.hkey = hkey<EOL><DEDENT>
Construct a new Key object.

        The key's name and parent key must be specified.  If the given
        name is a backslash-separated path it will be processed one 
        component at a time and the intermediate Key objects will be
        transparently instantiated.

        The optional argument 'sam' gives the security access mode to use
        for the key, defaulting to KEY_READ.  It more permissions are required
        for an attempted operation, we attempt to upgrade the permission
        automatically.

        If the optional argument 'hkey' is given, it is the underlying
        key id to be used when accessing the registry. This should really
        only be used for bootstrapping the root Key objects.