2017-01-04 7:39 GMT-03:00 Steve D'Aprano <steve+pyt...@pearwood.info>:
> On Wed, 4 Jan 2017 08:32 pm, Deborah Swanson wrote: > > Aside: you've actually raised a fascinating question. I wonder whether > there > are any programming languages that understand URLs as native data types, so > that *source code* starting with http:// etc is understood in the same way > that source code starting with [ is seen as a list or { as a dict? > ... > Some Smalltalk implementations have something that comes close: st> 'https://python.org' asUrl retrieveContents `asUrl` would be a string method returning a URL instance, which also has a convenient method `retrieveContents` wrapping an http client. Not hard to do with Python, I think this could be an interesting exercise for a learner. -- https://mail.python.org/mailman/listinfo/python-list