On Jul 7, 2004, at 12:51 AM, Mike Brown wrote: > Nick Bastin wrote: >> I could see a future where open() would support any valid URI > > -1. > > This already exists, mostly, in urllib.urlopen(), which happens to be > very > lenient in what it will accept as a "URL" to open. It attempts to > guess at the > intended behavior, regardless of whether the argument was a URI > (possibly > relative) or an OS path (possibly relative) or some hybrid of the two. > Often > it is impossible to tell based on syntax alone what type of > thing-to-be-dreferenced the argument is, so the function errs on the > side of > what's most likely -- not that it goes to great lengths. Keep in mind that I'm not actually suggesting that it *do* that, but merely as an example that open() could have a different behaviour from file(). -- Nick
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