[Python-Dev] Proposal for Python 3.3: dependence injection
Glenn Linderman
v+python at g.nevcal.com
Fri Mar 25 03:22:14 CET 2011
On 3/24/2011 4:25 PM, Nick Coghlan wrote:
> As an example of the last point, perhaps rather than modifying all the
> *clients* of the socket module, it may make more sense to have tools
> in the socket module itself to temporarily customise the socket
> creation process in the current thread. The advantage of such an
> approach is that it would then work for 3rd party libraries that
> create sockets, without requiring any further modification.
Would be easier to implement that way, not requiring changes to every
client of the socket library, but in some circles that would be called
"action at a distance", and harder to understand.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20110324/279ef8cd/attachment.html>
More information about the Python-Dev
mailing list