Mike Auty <mike.a...@gmail.com> added the comment:

> Why are you adding `.as_uri()`?

The API we provide accepts URIs, so whilst the example seems a little 
contrived, the code itself expects a URI and then calls open (making use of the 
ability to add open handlers).

> Builtin open() calls C open().

As best I can tell the file handler is defined in urllib/request.py as 
file_open.  This appears to do some preprocessing to remove the file scheme and 
(and explicitly throws an exception if there's a host that isn't localhost) 
before it gets to the C open().  I wondered why it didn't check if it was on 
windows and, if so, construct an appropriate path (since quadruple hash I don't 
think adheres to the URI RFC, but seems to open correctly)?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46654>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to