Hi Collin, > Oops yes. Good point, I must have overlooked that. It appears that it > will be O(n²). In this loop [1] and the else branch of > "PyAnySet_Check(other)" [2].
Thanks for checking. > The lists there seem small enough that I doubt it matters too much. Bad excuse :) You haven't seen this module yet: https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=blob;f=gnulib-local/modules/libxml;h=dc6404c59362e5d17885a211a61a4eed99da6642;hb=HEAD#l130 > Perhaps a patch like this is a better fix then just wrapping the call in > set() there: Although it would work to make _extract_lib_SOURCES return a set (since for both callers, the order of the result is irrelevant), it is more maintainable to let _extract_lib_SOURCES return a list and let each caller decide whether they need a set(...) conversion or not. This way, if a third caller is added in the future, you don't need to undo the optimization in _extract_lib_SOURCES. Bruno