3 ms·
That's some horrible url parsing code... But honestly urllib sucks: url.hostname doesn't return the port url.netloc also returns the basic auth part So you ha
by awoimbee 1y ago
That's some horrible url parsing code...
But honestly urllib sucks:
url.hostname doesn't return the port
url.netloc also returns the basic auth part
So you have to f"{u.hostname}:{u.port}"
- edelbitter 1y agoWait till you see the cPython stdlib email parser.. Any programming language these days should ship a decent rfc5234 API in the standard library, so you do not get these kinds of problems in slightly different fashion for each and every library/program.