Yeah, so the answer to all this is that 3rd party libraries know better than to mess with global settings. On Mon, Jan 28, 2013 at 1:27 PM, Ralf Schmitt <ralf at systemexit.de> wrote: > "R. David Murray" <rdmurray at bitdance.com> writes: > > > On Sun, 27 Jan 2013 21:56:06 +0100, Ralf Schmitt <ralf at systemexit.de> > wrote: > >> "R. David Murray" <rdmurray at bitdance.com> writes: > >> > >> > On Sun, 27 Jan 2013 19:42:59 +0100, Ralf Schmitt <ralf at systemexit.de> > wrote: > >> >> Guido van Rossum <guido at python.org> writes: > >> >> > >> >> > It's like calling socket.settimeout(0.1) and then complaining that > >> >> > urllib.urlopen() raises exceptions > >> >> > >> >> but that's not what's happening. you'll see urllib.urlopen raising > >> >> exceptions and only afterwards realize that you called into some > third > >> >> party library code that decided to change the timeout. > >> > > >> > What is stopping some some third party library code from calling > >> > socket.settimeout(0.1)? > >> > >> Nothing. That's the point. You just wonder why urlopen fails when the > >> global timeout has been changed by that third party library. > > > > Oh, you were agreeing with Guido? I guess I misunderstood. > > no. I think it's rather surprising if your code depends on some global > variable that might change by calling into some third party code. > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > http://mail.python.org/mailman/options/python-dev/guido%40python.org > -- --Guido van Rossum (python.org/~guido) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130128/179820ef/attachment-0001.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4