Checking your ipaddress object

What’s the netmask?

I hate trying to remember netmasks and how the differing notations match up. I tend to stick with the loveable IP format of 255.255.255.0 whereas others I know love to use the hate-filled 192.168.0.1/24 method. (There, I said it!).

Now I never have to plug my netmasks into a shady online calculator again:

Playing nice with other modules

As you play around with the ipaddress module you’ll find that the objects won’t play nice with other modules until converted to strings or integers. As per Section 21.28.2.2 on the official Python documentation.