[New-bugs-announce] [issue17875] Set Intersection returns unexpected results

Afif Elghraoui report at bugs.python.org
Tue Apr 30 07:04:30 CEST 2013


New submission from Afif Elghraoui:

I have two lists of strings (gene identifiers) that I know have something in common. I convert them to lists and do an intersection and I get the empty set. As an example test case, I know they both have the string 'Rv0500'

>>> list1.index('Rv0500')
278
>>> list2.index('Rv0500')
245
>>> set(list1).intersection(set(list2))
set([])

I was expecting to get a few hundred matches. My two lists are attached to this report. This is how I created the data file:

>>> x = shelve.open('lists.dat')
>>> x['list1'] = list1
>>> x['list2'] = list2
>>> x.close()

I did my best to make this report complete-- thanks for all your help.

----------
components: Interpreter Core
files: lists.dat
messages: 188125
nosy: Afif.Elghraoui
priority: normal
severity: normal
status: open
title: Set Intersection returns unexpected results
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file30075/lists.dat

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17875>
_______________________________________


More information about the New-bugs-announce mailing list