A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-July/101699.html below:

[Python-Dev] Can ftp url start with file:// ?

[Python-Dev] Can ftp url start with file:// ? [Python-Dev] Can ftp url start with file:// ?Fred Drake fdrake at acm.org
Sun Jul 11 19:35:21 CEST 2010
On Sat, Jul 10, 2010 at 11:56 PM, Senthil Kumaran <orsenthil at gmail.com> wrote:
> I see the reason. But I doubt if this is a reliable approach.  Also
> when the scheme begins with file:// it should not be confused with
> ftp, so I think, that portion of code in urllib which work that way
> should be removed.

I'm not trying to defend the current behavior of defaulting to FTP as
a good thing; it's definitely surprising.  I am trying to rationalize
it so I can be sure I understand why it might have been done to start
with.

My own preference is to kick out any non-local references with an
exception that can be detected (possibly derived from ValueError) so
that applications that want rewrite (hopefully with user agreement!)
can do so.  (Checking for non-local file: URLs on input might be
better, of course.)


  -Fred

-- 
Fred L. Drake   <fdrake at acm.org>
More information about the Python-Dev mailing list

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