-from . import dispatcher as _dispatcher
+__all__ = [
+ "Walker",
+ "WalkerMeta",
+]
+from . import dispatcher
-class WalkerMeta(_dispatcher.DispatcherMeta):
+
+class WalkerMeta(dispatcher.DispatcherMeta):
pass
-class Walker(_dispatcher.Dispatcher, metaclass=WalkerMeta):
- @_dispatcher.Hook(tuple, list, set, frozenset)
+class Walker(dispatcher.Dispatcher, metaclass=WalkerMeta):
+ @dispatcher.Hook(tuple, list, set, frozenset)
def dispatch_sequence(self, instance):
for item in instance:
yield item
yield from self(item)
- @_dispatcher.Hook(dict)
+ @dispatcher.Hook(dict)
def dispatch_mapping(self, instance):
for (key, value) in instance.items():
yield (key, value)
yield from self((key, value))
- @_dispatcher.Hook(object)
+ @dispatcher.Hook(object)
def dispatch_object(self, instance):
yield from ()