Code review comment for lp:~juju/txzookeeper/basic-node-api

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Nice improvements again, thank you!

Only one comment, and +1!

[6]

+ def __init__(self, event_type, connection_state, node):
+ self.type = event_type
+ self.connection_state = connection_state
+ self.node = node
+ self.path = node.path
+
+ @property
+ def kind(self):
+ return self.kind_map[self.type]

It'd be nice to have the naming convention consistent here. event.type returns an integer, and event.kind returns a string, but they both mean exactly the same thing with a different data type. As a side effect, a few weeks from now it will be hard to remember whether the string is the type or the kind. I suggest something like kind and kind_name, or type and type_name.

review: Approve

« Back to merge proposal