class_docstr: View base class.
  
  If C is a subclass of View, then C(x) creates a proxy object around
  the object x.  The actual class of the proxy is not C in general,
  but a *subclass* of C determined by the rules below.  To avoid confusion
  we call view class the class of the proxy (a subclass of C, so of View)
  and object class the class of x.
  
  Attributes and methods not found in the proxy are automatically read on x.
  Other operations like setting attributes are performed on the proxy, as
  determined by its view class.  The object x is available from the proxy
  as its __obj__ attribute.
  
  The view class selection is determined by the __view__ tuples and the
  optional __viewkey__ method.  By default, the selected view class is the
  most specific subclass of C whose __view__ mentions the class of x.
  If no such subclass is found, the search proceeds with the parent
  object classes.  For example, C(True) will first look for a subclass
  of C with __view__ = (..., bool, ...) and only if it doesn't find any
  look for one with __view__ = (..., int, ...), and then ..., object,...
  If everything fails the class C itself is considered to be the default.
  
  Alternatively, the view class selection can be driven by another aspect
  of the object x, instead of the class of x, by overriding __viewkey__.
  See last example at the end of this module.
class_docstr_tok: ["View","base","class",".","If","C","is","a","subclass","of","View",",","then","C","(","x",")","creates","a","proxy","object","around","the","object","x",".","The","actual","class","of","the","proxy","is","not","C","in","general",",","but","a","*","subclass","*","of","C","determined","by","the","rules","below",".","To","avoid","confusion","we","call","view","class","the","class","of","the","proxy","(","a","subclass","of","C",",","so","of","View",")","and","object","class","the","class","of","x",".","Attributes","and","methods","not","found","in","the","proxy","are","automatically","read","on","x",".","Other","operations","like","setting","attributes","are","performed","on","the","proxy",",","as","determined","by","its","view","class",".","The","object","x","is","available","from","the","proxy","as","its","__obj__","attribute",".","The","view","class","selection","is","determined","by","the","__view__","tuples","and","the","optional","__viewkey__","method",".","By","default",",","the","selected","view","class","is","the","most","specific","subclass","of","C","whose","__view__","mentions","the","class","of","x",".","If","no","such","subclass","is","found",",","the","search","proceeds","with","the","parent","object","classes",".","For","example",",","C","(","True",")","will","first","look","for","a","subclass","of","C","with","__view__","=","(","...",",","bool",",","...",")","and","only","if","it","does","n't","find","any","look","for","one","with","__view__","=","(","...",",","int",",","...",")",",","and","then","...",",","object",",","...","If","everything","fails","the","class","C","itself","is","considered","to","be","the","default",".","Alternatively",",","the","view","class","selection","can","be","driven","by","another","aspect","of","the","object","x",",","instead","of","the","class","of","x",",","by","overriding","__viewkey__",".","See","last","example","at","the","end","of","this","module","."]
code: def __getattr__(self, attr):
      # attributes not found in the normal hierarchy rooted on View
      # are looked up in the object's real class
      return getattr(self.__obj__, attr)
  
imports: import py
  import sys, inspect
  from compiler import parse, ast, pycodegen
  from py._code.assertion import BuiltinAssertionError, _format_explanation
  import types
label_desc: Use image node_id 2 for calling the View obj's underlying member method code with example usage: obj.__getattr__(attr) and returns: getattr