Public bug reported:

Binary package hint: python-launchpad-bugs

In the apport crash digger I do some set operations with BugList
results, and I just disbelievingly observed that one set grows like
this:

  set([94694, 103275, 111139]) + set([94694, 103275, 111139]) ==
set([103275, 111139, 111139, 94694, 103275, 94694])

and so on, yielding an endlessly growing set with duplicates of the
original three bug numbers.

This is because BugList returns a set of strings, not a set of ints, and
apparently set collapsing uses object identity instead of object
equivalence. So, for ints, 1 is 1, but for strings, "1" is not "1".

I worked around this in apport now by converting the set of strings into
a set of ints. But this could bite other users, too, so I recommend to
return a set of integers right away.

** Affects: python-launchpad-bugs (Ubuntu)
     Importance: Undecided
         Status: New

-- 
BugList should return a set of int, not string
https://bugs.launchpad.net/bugs/123933
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to