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

Unused argument in tcp_deadlock.py #19

Closed
wefer opened this issue Nov 26, 2016 · 4 comments
Closed

Unused argument in tcp_deadlock.py #19

wefer opened this issue Nov 26, 2016 · 4 comments
Assignees

Comments

@wefer
Copy link

wefer commented Nov 26, 2016

On line 8 def server(host, port, bytecount): the server takes a bytecount argument that appears not be used inside the procedure.

@wefer wefer changed the title Unused argument in tdp_deadlock.py Unused argument in tcp_deadlock.py Nov 30, 2016
@brandon-rhodes
Copy link
Owner

Have you tried removing the argument and running the server? :)

@wefer
Copy link
Author

wefer commented Dec 1, 2016

I see what the problem is :)

Maybe def server(host, port, *args): is better then? Since it might make it more clear that the server is unaware/indifferent of how many bytes it will receive from the client.

@brandon-rhodes brandon-rhodes self-assigned this Dec 2, 2016
@brandon-rhodes
Copy link
Owner

I have made the problem go away entirely by simply calling the server and client with different arguments in the first place. I'm not sure what that didn't occur to me when you first brought up the issue! But thanks for pointing it out, and hopefully this small readability win will help a few readers from being more confused than they need to be. Thanks!

@wefer
Copy link
Author

wefer commented Dec 3, 2016

Thanks for a great book!

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

No branches or pull requests

2 participants