[Python-3000] Set literal

Christian Heimes lists at cheimes.de
Sat Jan 26 22:50:14 CET 2008

Ron Adam wrote:
> It's all very close.  I think the frozenset({1,2,3}) example will get 
> faster if {..} notation becomes a frozen set, and set({...}) example will 
> slow down a bit.

frozenset({1,2,3}) can be optimized and reduced to a simple return in
frozenset_new() just like str("abc") returns the same string object. I
assume set({...}) is going to be as fast or maybe faster than set([...]).


More information about the Python-3000 mailing list