[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-dev] Stem code review 2012-12-10
Stem devs,
This is a review of recent commits to Stem. It begins where my last review ended[0] and finishes at the "Adding a close_stream..." merge.
The pydoc changes to Controller.extend_circuit are good additions.
I do not understand much of the context for changes regarding network status docs, exit policy, address type, etc. But, the code appears to do what the comments claim it should do (e.g. lazy loading address info). Take that evaluation with a grain of salt.
As to re-attaching event listeners[1], I agree that putting a specialized hook into BaseController.msg seems bad. I have an alternate idea[2] that puts the re-attachment in an authenticate method. I am not proposing this as the solution, but I hope this sparks the idea for another way to handle re-attachment.
I think the 'as' import keyword[3] is mainly for shortening long names and easily avoiding namespace collision. For example:
>>> import pkg.reallylongmodulename as rlmn
and
>>> import socket
>>> import niftysocket.socket as nsocket
[0]: https://lists.torproject.org/pipermail/tor-dev/2012-December/004240.html
[1]: https://gitweb.torproject.org/stem.git/commit/885a294646703a537c37cd2a5ac9aa8728561744
[2]: https://gitorious.org/stem-robinson/stem-robinson/commits/exp-reattach-listeners
[3]: https://gitweb.torproject.org/stem.git/commit/3da47d3b9d6d1ae5c6b2013a4247c45c13461a05
[4]: this footnote intentionally left blank
--
Sean Robinson
_______________________________________________
tor-dev mailing list
tor-dev@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev