Module Expr Str Import alias Import alias Import alias Import alias TryExcept body Expr NameLoad handlers ExceptHandler type NameLoad body FunctionDef arguments args NameParam defaults body Return Call NameLoad NameLoad Str decorator_list If CompareLt AttributeLoad NameLoad attr TupleLoad Num body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str orelse Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body If Call NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad orelse If CompareIsNot NameLoad NameLoad body Assert BoolOpOr Call NameLoad NameLoad Str Call NameLoad NameLoad Str BinOpMod Str NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad vararg kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad orelse Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Delete SubscriptDel AttributeLoad NameLoad attr Slice TryExcept body Delete SubscriptDel AttributeLoad AttributeLoad NameLoad attr attr Index AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass For NameStore NameLoad body TryExcept body If Call NameLoad NameLoad body Expr Call NameLoad NameLoad handlers ExceptHandler type NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num Print BinOpMod Str TupleLoad NameLoad NameLoad NameLoad decorator_list Assign AttributeStore NameLoad attr ListLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return TupleLoad Call NameLoad Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad decorator_list Assign NameStore Call NameLoad NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return CompareIsNot Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Return Call NameLoad AttributeLoad NameLoad attr Call NameLoad NameLoad Return Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list decorator_list
N/A N/A Refactored 'safe reference from dispatcher.py N/A operator N/A sys N/A traceback N/A weakref N/A N/A N/A callable N/A N/A N/A NameError N/A callable N/A N/A object N/A N/A N/A N/A hasattr object __call__ N/A N/A N/A N/A sys version_info N/A 3 N/A N/A get_self N/A N/A operator attrgetter im_self N/A get_func N/A N/A operator attrgetter im_func N/A N/A get_self N/A N/A operator attrgetter __self__ N/A get_func N/A N/A operator attrgetter __func__ safe_ref N/A N/A target on_delete N/A None N/A N/A Return a *safe* weak reference to a callable target.

    - ``target``: The object to be weakly referenced, if it's a bound
      method reference, will create a BoundMethodWeakref, otherwise
      creates a simple weakref.

    - ``on_delete``: If provided, will have a hard reference stored to
      the callable to be called after the safe reference goes out of
      scope with the reference object, (either a weakref or a
      BoundMethodWeakref) as argument.
     N/A N/A N/A im_self N/A get_self target N/A N/A N/A AttributeError N/A N/A N/A callable on_delete N/A N/A N/A N/A weakref ref target on_delete N/A N/A N/A N/A weakref ref target N/A N/A N/A im_self None N/A N/A N/A N/A hasattr target im_func N/A hasattr target __func__ N/A safe_ref target %r has im_self, but no im_func, don't know how to create reference target N/A reference N/A BoundMethodWeakref target target on_delete on_delete N/A reference N/A BoundMethodWeakref N/A object N/A N/A 'Safe' and reusable weak references to instance methods.

    BoundMethodWeakref objects provide a mechanism for referencing a
    bound method without requiring that the method object itself
    (which is normally a transient object) is kept alive.  Instead,
    the BoundMethodWeakref object keeps weak references to both the
    object and the function which together define the instance method.

    Attributes:

    - ``key``: The identity key for the reference, calculated by the
      class's calculate_key method applied to the target instance method.

    - ``deletion_methods``: Sequence of callable objects taking single
      argument, a reference to this object which will be called when
      *either* the target object or target function is garbage
      collected (i.e. when this object becomes invalid).  These are
      specified as the on_delete parameters of safe_ref calls.

    - ``weak_self``: Weak reference to the target object.

    - ``weak_func``: Weak reference to the target function.

    Class Attributes:

    - ``_all_instances``: Class attribute pointing to all live
      BoundMethodWeakref objects indexed by the class's
      calculate_key(target) method applied to the target objects.
      This weak value dictionary is used to short-circuit creation so
      that multiple references to the same (object, function) pair
      produce the same BoundMethodWeakref instance.
     N/A _all_instances N/A N/A weakref WeakValueDictionary __new__ N/A N/A cls target on_delete N/A None arguments named N/A N/A Create new instance or return current instance.

        Basically this method of construction allows us to
        short-circuit creation of references to already- referenced
        instance methods.  The key corresponding to the target is
        calculated, and if there is already an existing reference,
        that is returned, with its deletion_methods attribute updated.
        Otherwise the new instance is created and registered in the
        table of already-referenced methods.
         N/A key N/A N/A cls calculate_key target N/A current N/A N/A N/A cls _all_instances get key N/A N/A current None N/A N/A N/A N/A N/A current deletion_methods append on_delete N/A current N/A N/A base N/A N/A N/A super BoundMethodWeakref cls __new__ cls N/A N/A N/A cls _all_instances N/A key base N/A N/A N/A base __init__ target on_delete arguments named N/A base N/A __init__ N/A N/A self target on_delete N/A None N/A N/A Return a weak-reference-like instance for a bound method.

        - ``target``: The instance-method target for the weak reference,
          must have im_self and im_func attributes and be
          reconstructable via the following, which is true of built-in
          instance methods::

            target.im_func.__get__( target.im_self )

        - ``on_delete``: Optional callback which will be called when
          this weak reference ceases to be valid (i.e. either the
          object or the function is garbage collected).  Should take a
          single argument, which will be passed a pointer to this
          object.
         remove N/A N/A weak self N/A self N/A N/A Set self.isDead to True when method or instance is destroyed. N/A methods N/A N/A self deletion_methods N/A N/A N/A N/A self deletion_methods N/A N/A N/A N/A N/A N/A N/A self __class__ _all_instances N/A N/A self key N/A N/A N/A KeyError N/A N/A N/A function methods N/A N/A N/A N/A N/A callable function N/A N/A N/A function self N/A N/A N/A Exception N/A N/A N/A N/A N/A N/A traceback print_exc N/A N/A N/A AttributeError N/A N/A e N/A N/A N/A sys exc_info N/A 1 N/A N/A Exception during saferef %s cleanup function %s: %s N/A self function e N/A N/A N/A self deletion_methods N/A on_delete N/A N/A self key N/A N/A self calculate_key target N/A im_self N/A get_self target N/A im_func N/A get_func target N/A N/A self weak_self N/A N/A weakref ref im_self remove N/A N/A self weak_func N/A N/A weakref ref im_func remove N/A N/A self self_name N/A str im_self N/A N/A self func_name N/A str N/A im_func __name__ N/A calculate_key N/A N/A cls target N/A N/A N/A Calculate the reference key for this reference.

        Currently this is a two-tuple of the id()'s of the target
        object and the target function respectively.
         N/A N/A N/A id N/A get_self target N/A id N/A get_func target N/A N/A calculate_key N/A classmethod calculate_key __str__ N/A N/A self N/A N/A N/A Give a friendly representation of the object. N/A N/A %s(%s.%s) N/A N/A N/A self __class__ __name__ N/A self self_name N/A self func_name N/A N/A __repr__ __str__ __nonzero__ N/A N/A self N/A N/A N/A Whether we are still a valid reference. N/A N/A N/A self None N/A __cmp__ N/A N/A self other N/A N/A N/A Compare with another reference. N/A N/A N/A isinstance other N/A self __class__ N/A N/A N/A cmp N/A self __class__ N/A type other N/A N/A cmp N/A self key N/A other key N/A __call__ N/A N/A self N/A N/A N/A Return a strong reference to the bound method.

        If the target cannot be retrieved, then will return None,
        otherwise returns a bound instance method for our object and
        function.

        Note: You may call this method any number of times, as it does
        not invalidate the reference.
         N/A target N/A N/A self weak_self N/A N/A target None N/A N/A function N/A N/A self weak_func N/A N/A function None N/A N/A N/A N/A function __get__ target N/A None N/A N/A