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('192.168.0.0')
 network = IPNetwork((addr, '255.255.0.0'))

or

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

Of course it seems like this would be equivalent to:

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

(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 <rep...@bugs.python.org>
<http://bugs.python.org/issue16531>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to