wrapper and docs update.

This commit is contained in:
ingvar1995
2016-04-30 15:18:15 +03:00
parent 6a82b7d285
commit 59c72486f4
6 changed files with 45 additions and 49 deletions

View File

@@ -2,6 +2,7 @@ import random
class Node(object):
def __init__(self, ip, port, tox_key, rand):
self._ip, self._port, self._tox_key, self.rand = ip, port, tox_key, rand
@@ -80,8 +81,3 @@ def node_generator():
arr = sorted(nodes, key=lambda x: x.rand)[:4]
for elem in arr:
yield elem.get_data()
if __name__ == "__main__":
for elem in node_generator():
print str(elem)