Re:Potholes to avoid when migrating to IPv6
by anderskaseorg on Monday December 31, 2018 @03:04AM
(#18793597)
See also rsplit(':', 1). But instead of either of those, you should really be using library functions that already understand the format in question instead of making up your own rules.
[ Parent
| on HN ]
Urllib? There has to be a better choice than that. I've been using inet_ntop and pton to canonically convert bare IPs in to sane forms.