[New-bugs-announce] [issue16531] Allow IPNetwork to take a tuple

Antoine Pitrou report at bugs.python.org
Thu Nov 22 22:59:26 CET 2012

New submission from Antoine Pitrou:

I am in a situation where I'm building an IPNetwork from separate address and mask information. So roughly I'd like to write either:

 addr = IPAddress('')
 network = IPNetwork((addr, ''))


 addr = ''
 network = IPNetwork((addr, ''))

Of course it seems like this would be equivalent to:

 network = IPNetwork('%s/%s' % (addr, ''))

(but more user-friendly :-))

components: Library (Lib)
messages: 176129
nosy: ncoghlan, pitrou, pmoody
priority: low
severity: normal
status: open
title: Allow IPNetwork to take a tuple
type: enhancement
versions: Python 3.4

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list