Hi,

I just dug into the source code looking for complexity of set 
operations. In the wiki page I documented an interesting finding, that 
it is different to do s-t and s.difference(t). It is also interesting 
that you can do the first only for sets, but the second for every 
iterable in t.

Are these portable characteristics of the python language or just 
implementation specific details? In addition, can someone explain me the 
usefulness of the loop starting with 'if (PyDict_CheckExact(other))' in 
set_difference()? As I understand it set_difference() is always called 
with two sets as arguments (set_sub() does the actual call).

I'm just trying to figure out the complexity of the other set 
operations, but things get more complicated. I'd appreciate your help.


Thanks,
Dimitris
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to