| 1 | Index: twisted/python/_reflectpy3.py |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- twisted/python/_reflectpy3.py (revision 35819) |
|---|
| 4 | +++ twisted/python/_reflectpy3.py (working copy) |
|---|
| 5 | @@ -16,7 +16,8 @@ |
|---|
| 6 | |
|---|
| 7 | def prefixedMethods(obj, prefix=''): |
|---|
| 8 | """ |
|---|
| 9 | - A list of methods with a given prefix on a given instance. |
|---|
| 10 | + Given an object 'obj', returns a list of object methods that match the |
|---|
| 11 | + string in 'prefix'. |
|---|
| 12 | """ |
|---|
| 13 | dct = {} |
|---|
| 14 | accumulateMethods(obj, dct, prefix) |
|---|
| 15 | @@ -25,10 +26,10 @@ |
|---|
| 16 | |
|---|
| 17 | def accumulateMethods(obj, dict, prefix='', curClass=None): |
|---|
| 18 | """ |
|---|
| 19 | - accumulateMethods(instance, dict, prefix) |
|---|
| 20 | - I recurse through the bases of instance.__class__, and add methods |
|---|
| 21 | - beginning with 'prefix' to 'dict', in the form of |
|---|
| 22 | - {'methodname':*instance*method_object}. |
|---|
| 23 | + Recurses through the bases of obj.__class__ and adds any class methods |
|---|
| 24 | + prefixed with the string 'prefix'. Adds key/value pairs to dictionary |
|---|
| 25 | + 'dict' in the form {'unprefixed_method_name': *instance*method_object}. |
|---|
| 26 | + curClass should be treated as a private argument |
|---|
| 27 | """ |
|---|
| 28 | if not curClass: |
|---|
| 29 | curClass = obj.__class__ |
|---|