Sort list of dictionaries
Jason Friedman
jsf80238 at gmail.com
Tue Mar 3 09:45:20 EST 2015
On Tue, Mar 3, 2015 at 12:07 AM, Chris Angelico <rosuav at gmail.com> wrote:
> Heh, I think that miiiiiiiight be a bit abusive :) I'm not sure that
> you want to depend on the version numbers fitting inside the rules for
> IP addresses, especially given that the example has a component of
> "2214".
>
Indeed, I was mistaken
>>> ipaddress.ip_address("1000.1.2.3")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/python/lib/python3.4/ipaddress.py", line 54, in ip_address
address)
ValueError: '1000.1.2.3' does not appear to be an IPv4 or IPv6 address
I was overcome by how neat I think the ipaddress module is.
I have not used it yet, but I expect someday I will, and I appreciate
how Python makes my job easier by doing much of my work for me. A
colleague yesterday asked how I guaranteed my temporary file names
would not collide with another file, and my answer was I don't have to
worry about it, someone else figured it out with the tempfile module.
More information about the Python-list
mailing list