Pyro5
Pyro5 copied to clipboard
Let properties be generators too
I'm sure there's a better way to achieve this - but this tweak means properties can be generators too.
I did note that in the case you tried to call it as a method still, the error kinda sucked, but I think it's okay:
Pyro traceback:
Traceback (most recent call last):
File "<ipython-input-34-268747a29aa7>", line 3, in <module>
for results in dummy.thingos():
^^^^^^^^^^^^^^^
TypeError: '_StreamResultIterator' object is not callable
This function's also pretty enormous, so perhaps there's a good place to pull this section of repeated code out to?
Could you perhaps also add a unit test for this? I think TestServerOnce in test_server.py contains tests that check iteration and such