Non-merging IPSet

4 views
Skip to first unread message

Disp

unread,
Sep 8, 2010, 2:19:23 AM9/8/10
to netaddr
Is it possible to have IPSet not merge adjacent networks?

Eg.
>>> s = IPSet()
>>> s.add('192.168.0.0/24')
>>> s.add('192.168.1.0/24')
>>> s.iter_cidrs()
[IPNetwork('192.168.0.0/24'), IPNetwork('192.168.1.0/24')]

I agree that having IPSet merge elements where possible is usually
useful.

I am trying to use IPSet to represent various objects coming from
different data sources, and then quickly perform set operations upon
them. As each element that I put into the set represents a unique
object when IPSet merges the elements, the set no longer represents
the source data and the set operations are meaningless.

Thanks,
Daniel
Sydney, Australia

David Moss

unread,
Sep 14, 2010, 8:43:04 PM9/14/10
to netaddr
Hi Daniel,

Please can you log this as a ticket so we can track it? We are in the
process of moving from googlecode to github so please raise it here
for review :-

http://github.com/drkjam/netaddr/issues

Thanks,

Dave M.
Reply all
Reply to author
Forward
0 new messages