# Proxy object

class Proxy:
    '''A proxy that forwards all accesses to an inner object.
    Note that it does not forward attribute assignments.
    '''
    
    def __init__(self, inner): self.inner = inner
    
    def __getattr__(self, attr): return getattr(self.inner, attr)
    
    # Don't override __setattr__() because it prevents the subclass from storing
    # its own instance variables using "self." syntax
