[Python-checkins] r80101 - in python/trunk: Lib/test/test_urlparse.py Lib/urlparse.py Misc/NEWS

Senthil Kumaran orsenthil at gmail.com
Thu Apr 22 15:51:17 CEST 2010


On Thu, Apr 22, 2010 at 03:36:05PM +0200, Walter Dörwald wrote:
> >> if (('[' in url and ']' not in url) or
> >>     (']' in url and '[' not in url)):
> >>     raise ValueError("Invalid IPv6 URL")
> 
> And this is equivalent to:
> 
> if ('[' in url) != (']' in url):
>     raise ValueError("Invalid IPv6 URL")
> 

Too intricate. I wouldn't bother changing in now, Walter.
It requires a couple of seconds to get what it is doing.

Thanks,
Senthil



More information about the Python-checkins mailing list