(self, obj, *args, **kwargs)
| 31 | return _register |
| 32 | |
| 33 | def __call__(self, obj, *args, **kwargs): |
| 34 | if obj is None: |
| 35 | return |
| 36 | |
| 37 | Type = type(obj) |
| 38 | if Type not in self.__class__.visitors: |
| 39 | raise TypeError('%s: unsupported object type: %s' % ( |
| 40 | self.__class__.__name__, Type)) |
| 41 | |
| 42 | func = self.__class__.visitors[Type] |
| 43 | return func(self, obj, *args, **kwargs) |
| 44 | |
| 45 | |
| 46 | class Analyzer(Visitor): |