This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Nathaniel Manista
Recipients Nathaniel Manista, docs@python, r.david.murray
Date 2017-10-17.19:03:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1508266984.73.0.213398074469.issue31739@psf.upfronthosting.co.za>
In-reply-to
Content
As I am learning from the examples, I don't have the confidence to propose a fix to them. :-P

For the IPv4-and-IPv6 "Echo server program": should s be closed at some point after "conn, addr = s.accept()"? Should s be closed on the line immediately after "conn, addr = s.accept()", should it be closed on the last line (after the "with conn:" context is exited), or is either acceptable?

Should the "very simple network sniffer with raw sockets on Windows" have a with statement or "s.close()"? Should the "communicate to a CAN network using the raw socket protocol" example have a with statement or "s.close()"?

Of course it's possible that I'm misunderstanding one or more things.
History
Date User Action Args
2017-10-17 19:03:04Nathaniel Manistasetrecipients: + Nathaniel Manista, r.david.murray, docs@python
2017-10-17 19:03:04Nathaniel Manistasetmessageid: <1508266984.73.0.213398074469.issue31739@psf.upfronthosting.co.za>
2017-10-17 19:03:04Nathaniel Manistalinkissue31739 messages
2017-10-17 19:03:04Nathaniel Manistacreate