[Doc-SIG] Formalizing ST

Guido van Rossum guido@digicool.com
Thu, 29 Mar 2001 12:26:00 -0500


> Obvious URIs that fail the test are "." and ".." (both perfectly legal
> "local" references within an HTML document, and certainly possible
> things for someone to want to use in a docutils context, I'd have
> thought - particularly in a package's __init__.py docstring).

You can always append a "/" to URLs ending in "." or "..".  In fact
that's recommended practice anyway -- otherwise you incur an extra
server roundtrip since most servers give you a 301 or 302 redirect
with an appended slash if you give a directory URL without trailing
slash -- this is to make relative URLs work.

> > IMO it wouldn't hurt, if detection fails in this case.
> 
> The problem isn't with detection *failing*, it's partly to do with
> excessive detection (i.e., the pragmatic schemes generally try to
> over-identify URIs, just in case), but *mainly* due to a worry about
> explaining to a user what they can type that will work, before they type
> it.
> 
> An explanation that goes:
> 
>     "type your URI, but if it ends in one of
>      these characters, you'll have to escape
>      it, or something, and by the way *this*
>      ad-hoc list of characters inside your
>      URI also needs escaping"

Practical URLs don't end in punctuation.  Show me a website whose URLs
do and I'll change my mind, but I bet you can't find one.

--Guido van Rossum (home page: http://www.python.org/~guido/)