-
Notifications
You must be signed in to change notification settings - Fork 75
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
Improve the documentation for __next__() #73
Comments
@nuald what are you thoughts on this? |
I've already mentioned it here: https://github.com/pynetwork/pypcap/pull/47/files#r116732203 The loop should be infinite - it's the user responsibility to correctly exit the loop. The |
Ah right, thanks for reminding me of that. I would say then this ticket should become that of updating the docs to document this as the expected behaviour. |
@nuald But why not give users a choice to handle the event, like raise TimeoutError or something else? |
@wtdcode Sorry, I'm not working on this project nowadays, and only can give some advice: please feel free to modify |
After 924dfde,
__next__()
continues instead of returning None when timing out. This does not seem like ideal behavior. Am I misinterpreting timeout or misusing the function? Ideal code snippet:I modified pcap.pyx to return None and the code snippet worked.
The text was updated successfully, but these errors were encountered: