Module Import alias Import alias Import alias Import alias Import alias ImportFrom alias If AttributeLoad NameLoad attr body Import alias FunctionDef arguments args defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr decorator_list orelse FunctionDef arguments args defaults body Pass decorator_list Assign NameStore NameLoad ClassDef bases body FunctionDef arguments args NameParam defaults body Pass decorator_list decorator_list ClassDef bases body Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args defaults body FunctionDef arguments args defaults body Pass decorator_list Return NameLoad decorator_list FunctionDef arguments args defaults body Return AttributeLoad Call NameLoad attr decorator_list FunctionDef arguments args defaults body Return AttributeLoad NameLoad attr decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body AugAssignAdd AttributeStore NameLoad attr Num decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Repr NameLoad Delete NameDel Expr Repr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Delete NameDel Expr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareIs Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr CompareIs Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr Num Str decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Delete NameDel decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Delete NameDel FunctionDef arguments args NameParam defaults body Expr AttributeLoad NameLoad attr decorator_list Expr Call NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIsNot Call NameLoad NameLoad Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Num Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Delete NameDel Expr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr Num Str Expr Call AttributeLoad NameLoad attr CompareIs Call NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr NameLoad Num Str Delete NameDel Expr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr NameLoad Num Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Str Assign SubscriptStore NameLoad Slice ListLoad Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr CompareIn Num NameLoad Str Assign SubscriptStore NameLoad Index Num Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice SubscriptLoad NameLoad Slice Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num SubscriptLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num SubscriptLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num Num SubscriptLoad NameLoad Slice Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Str Delete NameDel NameDel Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Str Delete NameDel NameDel Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Str Delete NameDel NameDel Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIs Call NameLoad NameLoad AttributeLoad NameLoad attr Str Expr Call NameLoad Str Expr Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr Str Str Expr Call NameLoad keyword Str Expr Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Num Num Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr Num Str Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr Num Str Delete AttributeDel NameLoad attr Expr Call AttributeLoad NameLoad attr UnaryOpNot Call NameLoad NameLoad Str Str Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr Num Str Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr Num Str Delete AttributeDel NameLoad attr Expr Call AttributeLoad NameLoad attr UnaryOpNot Call NameLoad NameLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body ClassDef bases body Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Delete SubscriptDel NameLoad Index Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body ClassDef bases NameLoad body Pass decorator_list Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr NameLoad Num Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr NameLoad Num Str Delete NameDel NameDel NameDel NameDel Expr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr NameLoad Num Str Expr Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr Num Num Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Delete NameDel Expr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Delete NameDel Expr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad Str Delete NameDel Expr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr NameLoad ListLoad Str Expr Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr Num ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body ClassDef bases NameLoad body Pass decorator_list Assign NameStore Call NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareEq BinOpAdd NameLoad Num Num Expr Call AttributeLoad NameLoad attr CompareEq BinOpAdd Num NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body ClassDef bases NameLoad body Pass decorator_list Assign NameStore Dict FunctionDef arguments args NameParam defaults body Delete SubscriptDel NameLoad Index NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Lambda arguments args defaults TupleLoad Assign SubscriptStore NameLoad Index Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Raise NameLoad decorator_list TryExcept body Expr Call NameLoad handlers ExceptHandler type NameLoad body Pass orelse Expr Call AttributeLoad NameLoad attr Str TryExcept body Expr Call NameLoad handlers ExceptHandler type NameLoad body Pass orelse Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Import alias ClassDef bases NameLoad body Pass decorator_list Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr Delete NameDel Delete NameDel Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Delete NameDel Delete NameDel decorator_list FunctionDef arguments args NameParam defaults body Import alias ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Delete NameDel NameDel NameDel Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Import alias ClassDef bases NameLoad body Pass decorator_list ClassDef bases body FunctionDef arguments args NameParam NameParam defaults body Expr AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Delete NameDel NameDel NameDel Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Import alias ClassDef bases body FunctionDef arguments args NameParam NameParam defaults body Expr AttributeLoad NameLoad attr Expr AttributeLoad NameLoad attr Expr AttributeLoad NameLoad attr decorator_list decorator_list Assign TupleStore NameStore NameStore TupleLoad Call NameLoad Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Delete NameDel NameDel Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Import alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr AttributeLoad NameLoad attr Expr AttributeLoad NameLoad attr Expr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases body Pass decorator_list Assign TupleStore NameStore NameStore TupleLoad Call NameLoad Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Delete NameDel NameDel NameDel NameDel Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Import alias Assign NameStore ListLoad ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list Assign TupleStore NameStore NameStore TupleLoad Call NameLoad Num Call NameLoad Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str decorator_list Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Delete NameDel NameDel NameDel Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Delete SubscriptDel NameLoad Slice Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad decorator_list FunctionDef arguments args NameParam defaults body Import alias Assign NameStore ListLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str decorator_list decorator_list Assign TupleStore NameStore NameStore TupleLoad Call NameLoad Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIs Call NameLoad NameLoad Delete NameDel NameDel NameDel NameDel Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Expr Call AttributeLoad NameLoad attr Expr Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Delete SubscriptDel NameLoad Slice Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr ClassDef bases body Pass decorator_list FunctionDef arguments args defaults vararg body Pass decorator_list Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad TryFinally body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad finalbody If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Global identifier Assign NameStore Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list Assign NameStore Call NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list decorator_list Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad NameLoad keyword Num Expr Call AttributeLoad NameLoad attr CompareIs Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Delete NameDel Expr Call AttributeLoad NameLoad attr CompareIs Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body ClassDef bases AttributeLoad NameLoad attr body Pass decorator_list Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIsNot NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr CompareIs NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr CompareIn NameLoad SubscriptLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr CompareIn NameLoad SubscriptLoad NameLoad Slice Num decorator_list FunctionDef arguments args NameParam defaults body ClassDef bases AttributeLoad NameLoad attr body Pass decorator_list Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIsNot NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIn NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIn NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body ClassDef bases AttributeLoad NameLoad attr body Assign NameStore TupleLoad Str Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str decorator_list decorator_list ClassDef bases body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore Num FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr NameLoad Num BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr CompareIs NameLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareEq NameLoad NameLoad Str Delete NameDel NameDel Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad AttributeLoad NameLoad attr Delete SubscriptDel NameLoad Index Num Expr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad BinOpSub AttributeLoad NameLoad attr Num Str Delete NameDel NameDel Expr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad Num Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Assign SubscriptStore NameLoad Index Num Call NameLoad Expr Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr NameLoad Num BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr CompareIs AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad Call NameLoad NameLoad Str Delete NameDel NameDel Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad AttributeLoad NameLoad attr Delete SubscriptDel NameLoad Index Num Expr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad BinOpSub AttributeLoad NameLoad attr Num Str Delete NameDel NameDel Expr Call NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad Num Str Assign NameStore Call NameLoad Num Assign SubscriptStore NameLoad Index NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr UnaryOpNot Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIn NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr Call NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIn NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr Call NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad Num Str Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad Num Str Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad Num Str Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad Num Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Dict NameLoad Num Expr Call AttributeLoad NameLoad attr CompareEq SubscriptLoad NameLoad Index NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Dict NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareEq SubscriptLoad NameLoad Index NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr For NameStore NameLoad body Assign SubscriptStore NameLoad Index NameLoad AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr For NameStore NameLoad body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad Num If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad Num If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Call NameLoad Str Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad Str Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr CompareIsNot NameLoad NameLoad Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIs Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIs SubscriptLoad NameLoad Index NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIs Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIs SubscriptLoad NameLoad Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Call NameLoad Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad Str Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad Call NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIs NameLoad SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr CompareIs NameLoad Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr CompareIs NameLoad SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr CompareIs NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Num Str Call NameLoad Call NameLoad Call NameLoad Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Call NameLoad Call NameLoad Call NameLoad Num Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str Assign SubscriptStore NameLoad Index NameLoad Str Assign SubscriptStore NameLoad Index NameLoad Str Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad Num Delete SubscriptDel NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr ListLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad Num Delete SubscriptDel NameLoad Index Str Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr ListLoad TupleLoad Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore NameLoad ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If NameLoad body Delete SubscriptDel NameLoad Index Num Return CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore Call NameLoad Num For NameStore NameLoad body Assign SubscriptStore NameLoad Index NameLoad AttributeLoad NameLoad attr Delete NameDel Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore NameLoad Assign NameStore Num For NameStore NameLoad body AugAssignAdd NameStore Num Delete SubscriptDel NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Num decorator_list decorator_list ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Dict Str Str Str Call NameLoad Num Call NameLoad Num Call NameLoad Num Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Dict Call NameLoad Str Call NameLoad Str Call NameLoad Str Num Num Num Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list Assign NameStore Str Assign NameStore Dict Str NameLoad FunctionDef arguments args defaults body If AttributeLoad NameLoad attr body Delete AttributeDel NameLoad attr Delete AttributeDel NameLoad attr Delete AttributeDel NameLoad attr Delete AttributeDel NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A gc N/A sys N/A unittest N/A UserList N/A weakref test test_support N/A N/A test_support is_jython N/A N/A time extra_collect N/A N/A N/A N/A N/A Kick Java's GC into gear N/A N/A N/A gc collect N/A N/A N/A time sleep 0.2 N/A N/A N/A gc collect N/A N/A N/A time sleep 0.2 N/A N/A N/A gc collect N/A N/A extra_collect N/A N/A N/A N/A N/A N/A N/A ref_from_del None C N/A N/A method N/A N/A self N/A N/A N/A N/A N/A Callable N/A N/A N/A bar None __call__ N/A N/A self x N/A N/A N/A N/A self bar x N/A N/A create_function N/A N/A N/A N/A f N/A N/A N/A N/A N/A N/A N/A f N/A create_bound_method N/A N/A N/A N/A N/A N/A N/A C method N/A create_unbound_method N/A N/A N/A N/A N/A N/A C method N/A TestBase N/A N/A unittest TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self cbcalled 0 N/A callback N/A N/A self ref N/A N/A N/A N/A self cbcalled 1 N/A N/A ReferencesTestCase N/A TestBase N/A test_basic_ref N/A N/A self N/A N/A N/A N/A N/A self check_basic_ref C N/A N/A N/A self check_basic_ref create_function N/A N/A N/A self check_basic_ref create_bound_method N/A N/A N/A self check_basic_ref create_unbound_method N/A o N/A C N/A wr N/A N/A weakref ref o N/A N/A wr N/A o N/A N/A wr N/A test_basic_callback N/A N/A self N/A N/A N/A N/A N/A self check_basic_callback C N/A N/A N/A self check_basic_callback create_function N/A N/A N/A self check_basic_callback create_bound_method N/A N/A N/A self check_basic_callback create_unbound_method N/A test_multiple_callbacks N/A N/A self N/A N/A N/A o N/A C N/A ref1 N/A N/A weakref ref o N/A self callback N/A ref2 N/A N/A weakref ref o N/A self callback N/A o N/A N/A extra_collect N/A N/A N/A self assert_ N/A N/A ref1 None expected reference to be invalidated N/A N/A N/A self assert_ N/A N/A ref2 None expected reference to be invalidated N/A N/A N/A self assert_ N/A N/A self cbcalled 2 callback not called the right number of times N/A test_multiple_selfref_callbacks N/A N/A self N/A N/A callback N/A N/A object self N/A self N/A N/A N/A N/A self ref N/A N/A c N/A C N/A N/A self ref N/A N/A weakref ref c callback N/A ref1 N/A N/A weakref ref c callback N/A c N/A test_proxy_ref N/A N/A self N/A N/A N/A o N/A C N/A N/A o bar 1 N/A ref1 N/A N/A weakref proxy o N/A self callback N/A ref2 N/A N/A weakref proxy o N/A self callback N/A o check N/A N/A proxy N/A N/A N/A N/A proxy bar N/A N/A N/A extra_collect N/A N/A N/A self assertRaises N/A weakref ReferenceError check ref1 N/A N/A N/A self assertRaises N/A weakref ReferenceError check ref2 N/A N/A test_support is_jython N/A N/A N/A N/A self assertRaises N/A weakref ReferenceError bool ref1 N/A N/A N/A N/A self assertRaises N/A weakref ReferenceError bool N/A N/A weakref proxy N/A C N/A N/A N/A self assert_ N/A N/A self cbcalled 2 N/A check_basic_ref N/A N/A self factory N/A N/A N/A o N/A factory N/A ref N/A N/A weakref ref o N/A N/A N/A self assert_ N/A N/A ref None weak reference to live object should be live N/A o2 N/A ref N/A N/A N/A self assert_ N/A o o2 <ref>() should return original object if live N/A check_basic_callback N/A N/A self factory N/A N/A N/A N/A self cbcalled 0 N/A o N/A factory N/A ref N/A N/A weakref ref o N/A self callback N/A o N/A N/A extra_collect N/A N/A N/A self assert_ N/A N/A self cbcalled 1 callback did not properly set 'cbcalled' N/A N/A N/A self assert_ N/A N/A ref None ref2 should be dead after deleting object reference N/A test_ref_reuse N/A N/A self N/A N/A N/A o N/A C N/A ref1 N/A N/A weakref ref o N/A proxy N/A N/A weakref proxy o N/A ref2 N/A N/A weakref ref o N/A N/A N/A self assert_ N/A ref1 ref2 reference object w/out callback should be re-used N/A o N/A C N/A proxy N/A N/A weakref proxy o N/A ref1 N/A N/A weakref ref o N/A ref2 N/A N/A weakref ref o N/A N/A N/A self assert_ N/A ref1 ref2 reference object w/out callback should be re-used N/A N/A N/A self assert_ N/A N/A N/A weakref getweakrefcount o 2 wrong weak ref count for object N/A proxy N/A N/A extra_collect N/A N/A N/A self assert_ N/A N/A N/A weakref getweakrefcount o 1 wrong weak ref count for object after deleting proxy N/A test_proxy_reuse N/A N/A self N/A N/A N/A o N/A C N/A proxy1 N/A N/A weakref proxy o N/A ref N/A N/A weakref ref o N/A proxy2 N/A N/A weakref proxy o N/A N/A N/A self assert_ N/A proxy1 proxy2 proxy object w/out callback should have been re-used N/A test_basic_proxy N/A N/A self N/A N/A N/A o N/A C N/A N/A N/A self check_proxy o N/A N/A weakref proxy o N/A L N/A N/A UserList UserList N/A p N/A N/A weakref proxy L N/A N/A N/A self failIf p proxy for empty UserList should be false N/A N/A N/A p append 12 N/A N/A N/A self assertEqual N/A len L 1 N/A N/A N/A self failUnless p proxy for non-empty UserList should be true N/A N/A p N/A N/A 2 3 N/A N/A N/A self assertEqual N/A len L 2 N/A N/A N/A self assertEqual N/A len p 2 N/A N/A N/A self failUnless N/A 3 p proxy didn't support __contains__() properly N/A N/A p N/A 1 5 N/A N/A N/A self assertEqual N/A L N/A 1 5 N/A N/A N/A self assertEqual N/A p N/A 1 5 N/A L2 N/A N/A UserList UserList L N/A p2 N/A N/A weakref proxy L2 N/A N/A N/A self assertEqual p p2 N/A L3 N/A N/A UserList UserList N/A range 10 N/A p3 N/A N/A weakref proxy L3 N/A N/A N/A self assertEqual N/A L3 N/A N/A p3 N/A N/A N/A N/A self assertEqual N/A L3 N/A 5 N/A p3 N/A 5 N/A N/A N/A self assertEqual N/A L3 N/A 5 N/A p3 N/A 5 N/A N/A N/A self assertEqual N/A L3 N/A 2 5 N/A p3 N/A 2 5 N/A test_shared_ref_without_callback N/A N/A self N/A N/A N/A N/A N/A self check_shared_without_callback N/A weakref ref N/A test_shared_proxy_without_callback N/A N/A self N/A N/A N/A N/A N/A self check_shared_without_callback N/A weakref proxy N/A check_shared_without_callback N/A N/A self makeref N/A N/A N/A o N/A Object 1 N/A p1 N/A makeref o None N/A p2 N/A makeref o None N/A N/A N/A self assert_ N/A p1 p2 both callbacks were None in the C API N/A p1 p2 N/A p1 N/A makeref o N/A p2 N/A makeref o None N/A N/A N/A self assert_ N/A p1 p2 callbacks were NULL, None in the C API N/A p1 p2 N/A p1 N/A makeref o N/A p2 N/A makeref o N/A N/A N/A self assert_ N/A p1 p2 both callbacks were NULL in the C API N/A p1 p2 N/A p1 N/A makeref o None N/A p2 N/A makeref o N/A N/A N/A self assert_ N/A p1 p2 callbacks were None, NULL in the C API N/A test_callable_proxy N/A N/A self N/A N/A N/A o N/A Callable N/A ref1 N/A N/A weakref proxy o N/A N/A N/A self check_proxy o ref1 N/A N/A N/A self assert_ N/A N/A type ref1 N/A weakref CallableProxyType proxy is not of callable type N/A N/A ref1 twinkies! N/A N/A N/A self assert_ N/A N/A o bar twinkies! call through proxy not passed through to original N/A N/A ref1 x Splat. N/A N/A N/A self assert_ N/A N/A o bar Splat. call through proxy not passed through to original N/A N/A N/A self assertRaises TypeError ref1 N/A N/A N/A self assertRaises TypeError ref1 1 2 3 N/A check_proxy N/A N/A self o proxy N/A N/A N/A N/A o foo 1 N/A N/A N/A self assert_ N/A N/A proxy foo 1 proxy does not reflect attribute addition N/A N/A o foo 2 N/A N/A N/A self assert_ N/A N/A proxy foo 2 proxy does not reflect attribute modification N/A N/A o foo N/A N/A N/A self assert_ N/A N/A hasattr proxy foo proxy does not reflect attribute removal N/A N/A proxy foo 1 N/A N/A N/A self assert_ N/A N/A o foo 1 object does not reflect attribute addition via proxy N/A N/A proxy foo 2 N/A N/A N/A self assert_ N/A N/A o foo 2 object does not reflect attribute modification via proxy N/A N/A proxy foo N/A N/A N/A self assert_ N/A N/A hasattr o foo object does not reflect attribute removal via proxy N/A test_proxy_deletion N/A N/A self N/A N/A Foo N/A N/A N/A result None __delitem__ N/A N/A self accessor N/A N/A N/A N/A self result accessor N/A N/A N/A g N/A Foo N/A f N/A N/A weakref proxy g N/A N/A f N/A 0 N/A N/A N/A self assertEqual N/A f result 0 N/A test_proxy_bool N/A N/A self N/A N/A List N/A list N/A N/A N/A N/A lyst N/A List N/A N/A N/A self assertEqual N/A bool N/A N/A weakref proxy lyst N/A bool lyst N/A test_getweakrefcount N/A N/A self N/A N/A N/A o N/A C N/A ref1 N/A N/A weakref ref o N/A ref2 N/A N/A weakref ref o N/A self callback N/A N/A N/A self assert_ N/A N/A N/A weakref getweakrefcount o 2 got wrong number of weak reference objects N/A proxy1 N/A N/A weakref proxy o N/A proxy2 N/A N/A weakref proxy o N/A self callback N/A N/A N/A self assert_ N/A N/A N/A weakref getweakrefcount o 4 got wrong number of weak reference objects N/A ref1 ref2 proxy1 proxy2 N/A N/A extra_collect N/A N/A N/A self assert_ N/A N/A N/A weakref getweakrefcount o 0 weak reference objects not unlinked from referent when discarded. N/A N/A N/A self assert_ N/A N/A N/A weakref getweakrefcount 1 0 got wrong number of weak reference objects for int N/A test_getweakrefs N/A N/A self N/A N/A N/A o N/A C N/A ref1 N/A N/A weakref ref o N/A self callback N/A ref2 N/A N/A weakref ref o N/A self callback N/A ref1 N/A N/A extra_collect N/A N/A N/A self assert_ N/A N/A N/A weakref getweakrefs o N/A ref2 list of refs does not match N/A o N/A C N/A ref1 N/A N/A weakref ref o N/A self callback N/A ref2 N/A N/A weakref ref o N/A self callback N/A ref2 N/A N/A extra_collect N/A N/A N/A self assert_ N/A N/A N/A weakref getweakrefs o N/A ref1 list of refs does not match N/A ref1 N/A N/A extra_collect N/A N/A N/A self assert_ N/A N/A N/A weakref getweakrefs o N/A list of refs not cleared N/A N/A N/A self assert_ N/A N/A N/A weakref getweakrefs 1 N/A list of refs does not match for int N/A test_newstyle_number_ops N/A N/A self N/A N/A F N/A float N/A N/A N/A N/A f N/A F 2.0 N/A p N/A N/A weakref proxy f N/A N/A N/A self assert_ N/A N/A p 1.0 3.0 N/A N/A N/A self assert_ N/A N/A 1.0 p 3.0 N/A test_callbacks_protected N/A N/A self N/A N/A BogusError N/A Exception N/A N/A N/A N/A data N/A remove N/A N/A k N/A N/A N/A N/A data N/A k N/A encapsulate N/A N/A N/A N/A N/A f N/A N/A N/A N/A N/A N/A N/A data N/A N/A N/A weakref ref f remove None N/A BogusError N/A N/A N/A N/A N/A encapsulate N/A N/A N/A BogusError N/A N/A N/A N/A N/A N/A self fail exception not properly restored N/A N/A N/A N/A encapsulate N/A N/A N/A BogusError N/A N/A N/A N/A N/A N/A self fail exception not properly restored N/A test_sf_bug_840829 N/A N/A self N/A N/A N/A gc C N/A object N/A N/A N/A N/A c N/A C N/A wr N/A N/A weakref ref c N/A N/A N/A ignore N/A N/A N/A gc collect N/A c N/A wr N/A c1 N/A C N/A N/A c1 i N/A C N/A wr N/A N/A weakref ref N/A c1 i N/A N/A N/A ignore N/A N/A N/A gc collect N/A c2 N/A C N/A N/A c2 c1 c1 N/A c1 N/A c2 N/A test_callback_in_cycle_1 N/A N/A self N/A N/A N/A gc J N/A object N/A N/A N/A II N/A object N/A acallback N/A N/A self ignore N/A N/A N/A N/A self J N/A N/A N/A I N/A II N/A N/A I J J N/A N/A I wr N/A N/A weakref ref J N/A I acallback N/A I J II N/A N/A N/A gc collect N/A test_callback_in_cycle_2 N/A N/A self N/A N/A N/A gc J N/A object N/A N/A N/A II N/A N/A acallback N/A N/A self ignore N/A N/A N/A N/A self J N/A N/A N/A I N/A II N/A N/A I J J N/A N/A I wr N/A N/A weakref ref J N/A I acallback N/A I J II N/A N/A N/A gc collect N/A test_callback_in_cycle_3 N/A N/A self N/A N/A N/A gc C N/A N/A cb N/A N/A self ignore N/A N/A N/A N/A self me N/A N/A self c1 N/A N/A self wr N/A N/A N/A N/A c1 c2 N/A N/A C N/A C N/A N/A c2 me c2 N/A N/A c2 c1 c1 N/A N/A c2 wr N/A N/A weakref ref c1 N/A c2 cb N/A c1 c2 N/A N/A N/A gc collect N/A test_callback_in_cycle_4 N/A N/A self N/A N/A N/A gc C N/A object N/A cb N/A N/A self ignore N/A N/A N/A N/A self me N/A N/A self c1 N/A N/A self wr N/A N/A D N/A N/A N/A N/A N/A N/A c1 c2 N/A N/A D N/A C N/A N/A c2 me c2 N/A N/A c2 c1 c1 N/A N/A c2 wr N/A N/A weakref ref c1 N/A c2 cb N/A c1 c2 C D N/A N/A N/A gc collect N/A test_callback_in_cycle_resurrection N/A N/A self N/A N/A N/A gc N/A alist N/A C N/A object N/A __init__ N/A N/A self value N/A N/A N/A N/A self attribute value N/A acallback N/A N/A self ignore N/A N/A N/A N/A N/A alist append N/A self c N/A N/A N/A N/A c1 c2 N/A N/A C 1 N/A C 2 N/A N/A c1 c c2 N/A N/A c2 c c1 N/A N/A c1 wr N/A N/A weakref ref c2 N/A c1 acallback N/A N/A c2 wr N/A N/A weakref ref c1 N/A c2 acallback C_went_away N/A N/A ignore N/A N/A N/A N/A N/A alist append C went away N/A N/A wr N/A N/A weakref ref C C_went_away N/A c1 c2 C N/A N/A N/A self assertEqual alist N/A N/A N/A N/A gc collect N/A N/A N/A self assertEqual alist N/A C went away N/A N/A N/A self assertEqual N/A wr None N/A N/A alist N/A N/A N/A N/A gc collect N/A N/A N/A self assertEqual alist N/A N/A test_callbacks_on_callback N/A N/A self N/A N/A N/A gc N/A alist N/A safe_callback N/A N/A ignore N/A N/A N/A N/A N/A alist append safe_callback called N/A C N/A object N/A cb N/A N/A self ignore N/A N/A N/A N/A N/A alist append cb called N/A N/A N/A N/A c d N/A N/A C N/A C N/A N/A c other d N/A N/A d other c N/A callback N/A c cb N/A N/A c wr N/A N/A weakref ref d callback N/A N/A d wr N/A N/A weakref ref callback N/A d cb N/A external_wr N/A N/A weakref ref callback safe_callback N/A N/A N/A self assert_ N/A N/A external_wr callback N/A callback c d C N/A N/A N/A self assertEqual alist N/A N/A N/A N/A gc collect N/A N/A extra_collect N/A N/A N/A self assertEqual alist N/A safe_callback called N/A N/A N/A self assertEqual N/A external_wr None N/A N/A alist N/A N/A N/A N/A gc collect N/A N/A N/A self assertEqual alist N/A N/A test_gc_during_ref_creation N/A N/A self N/A N/A N/A N/A N/A self check_gc_during_creation N/A weakref ref N/A test_gc_during_proxy_creation N/A N/A self N/A N/A N/A N/A N/A self check_gc_during_creation N/A weakref proxy N/A check_gc_during_creation N/A N/A self makeref N/A N/A N/A N/A N/A test_support is_jython N/A N/A thresholds N/A N/A gc get_threshold N/A N/A N/A gc set_threshold 1 1 1 N/A N/A N/A gc collect A N/A N/A N/A N/A callback N/A N/A N/A args N/A N/A N/A N/A referenced N/A A N/A a N/A A N/A N/A a a a N/A N/A a wr N/A makeref referenced N/A N/A N/A a N/A A N/A N/A N/A weakref ref referenced callback N/A N/A N/A N/A test_support is_jython N/A N/A N/A N/A gc set_threshold thresholds N/A test_ref_created_during_del N/A N/A self N/A N/A Target N/A object N/A __del__ N/A N/A self N/A N/A N/A ref_from_del N/A ref_from_del N/A N/A weakref ref self N/A N/A N/A w N/A Target N/A N/A SubclassableWeakrefTestCase N/A N/A unittest TestCase N/A test_subclass_refs N/A N/A self N/A N/A MyRef N/A N/A weakref ref N/A __init__ N/A N/A self ob callback value N/A None 42 N/A N/A N/A self value value N/A N/A N/A N/A super MyRef self __init__ ob callback N/A __call__ N/A N/A self N/A N/A N/A N/A self called True N/A N/A N/A N/A super MyRef self __call__ N/A N/A N/A o N/A Object foo N/A mr N/A MyRef o value 24 N/A N/A N/A self assert_ N/A N/A mr o N/A N/A N/A self assert_ N/A mr called N/A N/A N/A self assertEqual N/A mr value 24 N/A o N/A N/A N/A self assert_ N/A N/A mr None N/A N/A N/A self assert_ N/A mr called N/A test_subclass_refs_dont_replace_standard_refs N/A N/A self N/A N/A MyRef N/A N/A weakref ref N/A N/A N/A N/A o N/A Object 42 N/A r1 N/A MyRef o N/A r2 N/A N/A weakref ref o N/A N/A N/A self assert_ N/A r1 r2 N/A N/A N/A self assertEqual N/A N/A weakref getweakrefs o N/A r2 r1 N/A N/A N/A self assertEqual N/A N/A weakref getweakrefcount o 2 N/A r3 N/A MyRef o N/A N/A N/A self assertEqual N/A N/A weakref getweakrefcount o 3 N/A refs N/A N/A weakref getweakrefs o N/A N/A N/A self assertEqual N/A len refs 3 N/A N/A N/A self assert_ N/A r2 N/A refs N/A 0 N/A N/A N/A self assert_ N/A r1 N/A refs N/A 1 N/A N/A N/A self assert_ N/A r3 N/A refs N/A 1 N/A test_subclass_refs_dont_conflate_callbacks N/A N/A self N/A N/A MyRef N/A N/A weakref ref N/A N/A N/A N/A o N/A Object 42 N/A r1 N/A MyRef o id N/A r2 N/A MyRef o str N/A N/A N/A self assert_ N/A r1 r2 N/A refs N/A N/A weakref getweakrefs o N/A N/A N/A self assert_ N/A r1 refs N/A N/A N/A self assert_ N/A r2 refs N/A test_subclass_refs_with_slots N/A N/A self N/A N/A MyRef N/A N/A weakref ref N/A N/A __slots__ N/A slot1 slot2 __new__ N/A N/A type ob callback slot1 slot2 N/A N/A N/A N/A N/A N/A weakref ref __new__ type ob callback N/A __init__ N/A N/A self ob callback slot1 slot2 N/A N/A N/A N/A self slot1 slot1 N/A N/A self slot2 slot2 N/A meth N/A N/A self N/A N/A N/A N/A N/A self slot1 N/A self slot2 N/A N/A N/A o N/A Object 42 N/A r N/A MyRef o None abc def N/A N/A N/A self assertEqual N/A r slot1 abc N/A N/A N/A self assertEqual N/A r slot2 def N/A N/A N/A self assertEqual N/A N/A r meth abcdef N/A N/A N/A self failIf N/A hasattr r __dict__ N/A N/A Object N/A N/A __init__ N/A N/A self arg N/A N/A N/A N/A self arg arg N/A __repr__ N/A N/A self N/A N/A N/A N/A <Object %r> N/A self arg N/A N/A MappingTestCase N/A TestBase N/A N/A COUNT 10 test_weak_values N/A N/A self N/A N/A N/A N/A dict objects N/A N/A self make_weak_valued_dict N/A o objects N/A N/A N/A N/A self assert_ N/A N/A N/A weakref getweakrefcount o 1 N/A wrong number of weak references to %r! o N/A N/A N/A self assert_ N/A o N/A dict N/A N/A o arg wrong object returned by weak dict! N/A items1 N/A N/A dict items N/A items2 N/A N/A N/A N/A dict copy items N/A N/A N/A items1 sort N/A N/A N/A items2 sort N/A N/A N/A self assert_ N/A items1 items2 cloning of weak-valued dictionary did not work! N/A items1 items2 N/A N/A N/A self assert_ N/A N/A len dict N/A self COUNT N/A N/A objects N/A 0 N/A N/A extra_collect N/A N/A N/A self assert_ N/A N/A len dict N/A N/A self COUNT 1 deleting object did not cause dictionary update N/A objects o N/A N/A extra_collect N/A N/A N/A self assert_ N/A N/A len dict 0 deleting the values did not clear the dictionary N/A dict N/A N/A weakref WeakValueDictionary N/A N/A N/A self assertRaises KeyError N/A dict __getitem__ 1 N/A N/A dict N/A 2 N/A C N/A N/A extra_collect N/A N/A N/A self assertRaises KeyError N/A dict __getitem__ 2 N/A test_weak_keys N/A N/A self N/A N/A N/A N/A dict objects N/A N/A self make_weak_keyed_dict N/A o objects N/A N/A N/A N/A self assert_ N/A N/A N/A weakref getweakrefcount o 1 N/A wrong number of weak references to %r! o N/A N/A N/A self assert_ N/A N/A o arg N/A dict N/A o wrong object returned by weak dict! N/A items1 N/A N/A dict items N/A items2 N/A N/A N/A N/A dict copy items N/A N/A N/A self assert_ N/A N/A set items1 N/A set items2 cloning of weak-keyed dictionary did not work! N/A items1 items2 N/A N/A N/A self assert_ N/A N/A len dict N/A self COUNT N/A N/A objects N/A 0 N/A N/A extra_collect N/A N/A N/A self assert_ N/A N/A len dict N/A N/A self COUNT 1 deleting object did not cause dictionary update N/A objects o N/A N/A extra_collect N/A N/A N/A self assert_ N/A N/A len dict 0 deleting the keys did not clear the dictionary N/A o N/A Object 42 N/A N/A dict N/A o What is the meaning of the universe? N/A N/A N/A self assert_ N/A N/A dict has_key o N/A N/A N/A self assert_ N/A N/A N/A dict has_key 34 N/A test_weak_keyed_iters N/A N/A self N/A N/A N/A N/A dict objects N/A N/A self make_weak_keyed_dict N/A N/A N/A self check_iters dict N/A refs N/A N/A dict keyrefs N/A N/A N/A self assertEqual N/A len refs N/A len objects N/A objects2 N/A list objects N/A wr refs N/A N/A ob N/A wr N/A N/A N/A self assert_ N/A N/A dict has_key ob N/A N/A N/A self assert_ N/A ob dict N/A N/A N/A self assertEqual N/A ob arg N/A dict N/A ob N/A N/A N/A objects2 remove ob N/A N/A N/A self assertEqual N/A len objects2 0 N/A objects2 N/A list objects N/A N/A N/A self assertEqual N/A len N/A list N/A N/A dict iterkeyrefs N/A len objects N/A wr N/A N/A dict iterkeyrefs N/A N/A ob N/A wr N/A N/A N/A self assert_ N/A N/A dict has_key ob N/A N/A N/A self assert_ N/A ob dict N/A N/A N/A self assertEqual N/A ob arg N/A dict N/A ob N/A N/A N/A objects2 remove ob N/A N/A N/A self assertEqual N/A len objects2 0 N/A test_weak_valued_iters N/A N/A self N/A N/A N/A N/A dict objects N/A N/A self make_weak_valued_dict N/A N/A N/A self check_iters dict N/A refs N/A N/A dict valuerefs N/A N/A N/A self assertEqual N/A len refs N/A len objects N/A objects2 N/A list objects N/A wr refs N/A N/A ob N/A wr N/A N/A N/A self assertEqual ob N/A dict N/A N/A ob arg N/A N/A N/A self assertEqual N/A ob arg N/A N/A dict N/A N/A ob arg arg N/A N/A N/A objects2 remove ob N/A N/A N/A self assertEqual N/A len objects2 0 N/A objects2 N/A list objects N/A N/A N/A self assertEqual N/A len N/A list N/A N/A dict itervaluerefs N/A len objects N/A wr N/A N/A dict itervaluerefs N/A N/A ob N/A wr N/A N/A N/A self assertEqual ob N/A dict N/A N/A ob arg N/A N/A N/A self assertEqual N/A ob arg N/A N/A dict N/A N/A ob arg arg N/A N/A N/A objects2 remove ob N/A N/A N/A self assertEqual N/A len objects2 0 N/A check_iters N/A N/A self dict N/A N/A N/A items N/A N/A dict items N/A item N/A N/A dict iteritems N/A N/A N/A N/A items remove item N/A N/A N/A self assert_ N/A N/A len items 0 iteritems() did not touch all items N/A keys N/A N/A dict keys N/A k dict N/A N/A N/A N/A keys remove k N/A N/A N/A self assert_ N/A N/A len keys 0 __iter__() did not touch all keys N/A keys N/A N/A dict keys N/A k N/A N/A dict iterkeys N/A N/A N/A N/A keys remove k N/A N/A N/A self assert_ N/A N/A len keys 0 iterkeys() did not touch all keys N/A values N/A N/A dict values N/A v N/A N/A dict itervalues N/A N/A N/A N/A values remove v N/A N/A N/A self assert_ N/A N/A len values 0 itervalues() did not touch all values N/A test_make_weak_keyed_dict_from_dict N/A N/A self N/A N/A N/A o N/A Object 3 N/A dict N/A N/A weakref WeakKeyDictionary N/A o 364 N/A N/A N/A self assert_ N/A N/A dict N/A o 364 N/A test_make_weak_keyed_dict_from_weak_keyed_dict N/A N/A self N/A N/A N/A o N/A Object 3 N/A dict N/A N/A weakref WeakKeyDictionary N/A o 364 N/A dict2 N/A N/A weakref WeakKeyDictionary dict N/A N/A N/A self assert_ N/A N/A dict N/A o 364 N/A make_weak_keyed_dict N/A N/A self N/A N/A N/A dict N/A N/A weakref WeakKeyDictionary N/A objects N/A map Object N/A range N/A self COUNT N/A o objects N/A N/A N/A dict N/A o N/A o arg N/A N/A dict objects N/A make_weak_valued_dict N/A N/A self N/A N/A N/A dict N/A N/A weakref WeakValueDictionary N/A objects N/A map Object N/A range N/A self COUNT N/A o objects N/A N/A N/A dict N/A N/A o arg o N/A N/A dict objects N/A check_popitem N/A N/A self klass key1 value1 key2 value2 N/A N/A N/A weakdict N/A klass N/A N/A weakdict N/A key1 value1 N/A N/A weakdict N/A key2 value2 N/A N/A N/A self assert_ N/A N/A len weakdict 2 N/A N/A k v N/A N/A weakdict popitem N/A N/A N/A self assert_ N/A N/A len weakdict 1 N/A N/A k key1 N/A N/A N/A N/A self assert_ N/A v value1 N/A N/A N/A N/A self assert_ N/A v value2 N/A N/A k v N/A N/A weakdict popitem N/A N/A N/A self assert_ N/A N/A len weakdict 0 N/A N/A k key1 N/A N/A N/A N/A self assert_ N/A v value1 N/A N/A N/A N/A self assert_ N/A v value2 N/A test_weak_valued_dict_popitem N/A N/A self N/A N/A N/A N/A N/A self check_popitem N/A weakref WeakValueDictionary key1 N/A C key2 N/A C N/A test_weak_keyed_dict_popitem N/A N/A self N/A N/A N/A N/A N/A self check_popitem N/A weakref WeakKeyDictionary N/A C value 1 N/A C value 2 N/A check_setdefault N/A N/A self klass key value1 value2 N/A N/A N/A N/A N/A self assert_ N/A value1 value2 invalid test -- value parameters must be distinct objects N/A weakdict N/A klass N/A o N/A N/A weakdict setdefault key value1 N/A N/A N/A self assert_ N/A o value1 N/A N/A N/A self assert_ N/A N/A weakdict has_key key N/A N/A N/A self assert_ N/A N/A N/A weakdict get key value1 N/A N/A N/A self assert_ N/A N/A weakdict N/A key value1 N/A o N/A N/A weakdict setdefault key value2 N/A N/A N/A self assert_ N/A o value1 N/A N/A N/A self assert_ N/A N/A weakdict has_key key N/A N/A N/A self assert_ N/A N/A N/A weakdict get key value1 N/A N/A N/A self assert_ N/A N/A weakdict N/A key value1 N/A test_weak_valued_dict_setdefault N/A N/A self N/A N/A N/A N/A N/A self check_setdefault N/A weakref WeakValueDictionary key N/A C N/A C N/A test_weak_keyed_dict_setdefault N/A N/A self N/A N/A N/A N/A N/A self check_setdefault N/A weakref WeakKeyDictionary N/A C value 1 value 2 N/A check_update N/A N/A self klass dict N/A N/A N/A weakdict N/A klass N/A N/A N/A weakdict update dict N/A N/A N/A self assert_ N/A N/A len weakdict N/A len dict N/A k N/A N/A weakdict keys N/A N/A N/A N/A self assert_ N/A N/A dict has_key k mysterious new key appeared in weak dict N/A v N/A N/A dict get k N/A N/A N/A self assert_ N/A v N/A weakdict N/A k N/A N/A N/A self assert_ N/A v N/A N/A weakdict get k N/A k N/A N/A dict keys N/A N/A N/A N/A self assert_ N/A N/A weakdict has_key k original key disappeared in weak dict N/A v N/A dict N/A k N/A N/A N/A self assert_ N/A v N/A weakdict N/A k N/A N/A N/A self assert_ N/A v N/A N/A weakdict get k N/A test_weak_valued_dict_update N/A N/A self N/A N/A N/A N/A N/A self check_update N/A weakref WeakValueDictionary N/A 1 a N/A C N/A C N/A C N/A C N/A test_weak_keyed_dict_update N/A N/A self N/A N/A N/A N/A N/A self check_update N/A weakref WeakKeyDictionary N/A N/A C N/A C N/A C 1 2 3 N/A test_weak_keyed_delitem N/A N/A self N/A N/A N/A d N/A N/A weakref WeakKeyDictionary N/A o1 N/A Object 1 N/A o2 N/A Object 2 N/A N/A d N/A o1 something N/A N/A d N/A o2 something N/A N/A N/A self assert_ N/A N/A len d 2 N/A N/A d N/A o1 N/A N/A N/A self assert_ N/A N/A len d 1 N/A N/A N/A self assert_ N/A N/A N/A d keys N/A o2 N/A test_weak_valued_delitem N/A N/A self N/A N/A N/A d N/A N/A weakref WeakValueDictionary N/A o1 N/A Object 1 N/A o2 N/A Object 2 N/A N/A d N/A something o1 N/A N/A d N/A something else o2 N/A N/A N/A self assert_ N/A N/A len d 2 N/A N/A d N/A something N/A N/A N/A self assert_ N/A N/A len d 1 N/A N/A N/A self assert_ N/A N/A N/A d items N/A N/A something else o2 N/A test_weak_keyed_bad_delitem N/A N/A self N/A N/A N/A d N/A N/A weakref WeakKeyDictionary N/A o N/A Object 1 N/A N/A N/A self assertRaises KeyError N/A d __delitem__ o N/A N/A N/A self assertRaises KeyError N/A d __getitem__ o N/A N/A N/A self assertRaises TypeError N/A d __delitem__ 13 N/A N/A N/A self assertRaises TypeError N/A d __getitem__ 13 N/A N/A N/A self assertRaises TypeError N/A d __setitem__ 13 13 N/A test_weak_keyed_cascading_deletes N/A N/A self N/A N/A N/A d N/A N/A weakref WeakKeyDictionary N/A mutate False C N/A object N/A __init__ N/A N/A self i N/A N/A N/A N/A self value i N/A __hash__ N/A N/A self N/A N/A N/A N/A hash N/A self value N/A __eq__ N/A N/A self other N/A N/A N/A mutate N/A N/A N/A objs N/A -1 N/A N/A N/A self value N/A other value N/A N/A N/A objs N/A N/A C i N/A i N/A range 4 N/A o objs N/A N/A N/A d N/A o N/A o value N/A o N/A objs N/A N/A d keys N/A N/A N/A objs reverse N/A mutate True N/A count 0 N/A o objs N/A N/A count 1 N/A N/A d N/A o N/A N/A N/A self assertEqual N/A len d 0 N/A N/A N/A self assertEqual count 2 N/A N/A test mapping_tests WeakValueDictionaryTestCase N/A N/A mapping_tests BasicTestMappingProtocol N/A N/A Check that WeakValueDictionary conforms to the mapping protocol N/A __ref N/A key1 key2 key3 N/A Object 1 N/A Object 2 N/A Object 3 N/A type2test N/A weakref WeakValueDictionary _reference N/A N/A self N/A N/A N/A N/A N/A N/A self __ref copy N/A N/A WeakKeyDictionaryTestCase N/A N/A mapping_tests BasicTestMappingProtocol N/A N/A Check that WeakKeyDictionary conforms to the mapping protocol N/A __ref N/A N/A Object key1 N/A Object key2 N/A Object key3 1 2 3 N/A type2test N/A weakref WeakKeyDictionary _reference N/A N/A self N/A N/A N/A N/A N/A N/A self __ref copy N/A N/A N/A libreftest  Doctest for examples in the library reference: libweakref.tex

>>> import weakref
>>> class Dict(dict):
...     pass
...
>>> obj = Dict(red=1, green=2, blue=3)   # this object is weak referencable
>>> r = weakref.ref(obj)
>>> print r() is obj
True

>>> import weakref
>>> class Object:
...     pass
...
>>> o = Object()
>>> r = weakref.ref(o)
>>> o2 = r()
>>> o is o2
True
>>> del o, o2
>>> extra_collect()
>>> print r()
None

>>> import weakref
>>> class ExtendedRef(weakref.ref):
...     def __init__(self, ob, callback=None, **annotations):
...         super(ExtendedRef, self).__init__(ob, callback)
...         self.__counter = 0
...         for k, v in annotations.iteritems():
...             setattr(self, k, v)
...     def __call__(self):
...         '''Return a pair containing the referent and the number of
...         times the reference has been called.
...         '''
...         ob = super(ExtendedRef, self).__call__()
...         if ob is not None:
...             self.__counter += 1
...             ob = (ob, self.__counter)
...         return ob
...
>>> class A:   # not in docs from here, just testing the ExtendedRef
...     pass
...
>>> a = A()
>>> r = ExtendedRef(a, foo=1, bar="baz")
>>> r.foo
1
>>> r.bar
'baz'
>>> r()[1]
1
>>> r()[1]
2
>>> r()[0] is a
True


>>> import weakref
>>> _id2obj_dict = weakref.WeakValueDictionary()
>>> def remember(obj):
...     oid = id(obj)
...     _id2obj_dict[oid] = obj
...     return oid
...
>>> def id2obj(oid):
...     return _id2obj_dict[oid]
...
>>> a = A()             # from here, just testing
>>> a_id = remember(a)
>>> id2obj(a_id) is a
True
>>> del a
>>> extra_collect()
>>> try:
...     id2obj(a_id)
... except KeyError:
...     print 'OK'
... else:
...     print 'WeakValueDictionary error'
OK

 N/A __test__ N/A libreftest libreftest test_main N/A N/A N/A N/A N/A N/A test_support is_jython N/A N/A N/A ReferencesTestCase test_callback_in_cycle_resurrection N/A N/A ReferencesTestCase test_callbacks_on_callback N/A N/A MappingTestCase test_weak_keyed_bad_delitem N/A N/A MappingTestCase test_weak_keyed_cascading_deletes N/A N/A N/A test_support run_unittest ReferencesTestCase MappingTestCase WeakValueDictionaryTestCase WeakKeyDictionaryTestCase N/A N/A N/A test_support run_doctest N/A N/A sys modules N/A __name__ N/A N/A N/A __name__ __main__ N/A N/A N/A test_main