Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let properties be generators too #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mawildoer
Copy link

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?

@irmen
Copy link
Owner

irmen commented Feb 4, 2024

Could you perhaps also add a unit test for this?
I think TestServerOnce in test_server.py contains tests that check iteration and such

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants