Clickable hyperlinks

Steven D'Aprano steve+comp.lang.python at
Thu Jan 5 00:30:42 EST 2017

On Thursday 05 January 2017 14:22, Rustom Mody wrote:

> This thread does lead to the question:
> Is the Url type in python less first-class than it could be?
> In scheme I could point to something like this

Those docs say:

"To access the text of a document from the web, first obtain its URL 
AS A STRING..." [emphasis added]

which means that URLs are not a first-class data type in Racket at all. URLs in 
Racket are just strings, exactly the same as in Python.

There is a url struct:

but there no first-class syntactic support for them, as ints and lists have in 

123  # rather than int("123")
[1, 2]  # rather than list(1, 2)

> Is there something equivalent in python?

Just like Racket, URLs in Python are not first-class. They start as a string, 
and then you parse them into a tuple:

"Ever since I learned about confirmation bias, I've been seeing 
it everywhere." - Jon Ronson

More information about the Python-list mailing list