LWN.net Logo

What is to replace Perl then?

What is to replace Perl then?

Posted Dec 4, 2008 0:17 UTC (Thu) by jwb (guest, #15467)
In reply to: What is to replace Perl then? by sbergman27
Parent article: On the future of Perl 5

That's great, now what are you going to do with that tuple? You can't feed it to urllib2. urllib2 wants the URL as a string, but it can't parse all the ones that urlparse can parse. See the problem?


(Log in to post comments)

What is to replace Perl then?

Posted Dec 4, 2008 2:40 UTC (Thu) by drag (subscriber, #31333) [Link]

Ya. I would consider that a bug.

What is to replace Perl then?

Posted Dec 4, 2008 3:42 UTC (Thu) by sbergman27 (guest, #10767) [Link]

If so, it doesn't seem to be one that many Python users care about. I spend a lot of time in Python web development communities (Django, TurboGears) and its not something I hear complaints about.

urllib does support this directly:

---
from urllib import urlopen
> x = urlopen('http://myuser:mypasswd@google.com/')
> len(x.read())
5856
---

There have, however, been a couple of request nibbles on the issue tracker over the last 4 years or so to add the functionality to urllib2 as well, and no actual opposition to it. Interestingly, there was activity today from a dev saying he was implementing it, noting that it would be trivial to do.

Personally, I think its probably a good idea, but since its just a few lines to handle this case, it doesn't really bother me.

Like I said, this seems something of a cherry-picked example to "prove" that Python's url handling is "not mature". I'm sure that Python and Ruby folks could pick more than a few cherries regarding Perl's problems if they wanted to.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds