On Thu, 22 Apr 2010 02:28:03 am Bala subramanian wrote:
> Friends,
> Someone please write me the difference between creating set with
> set() and a sets.Set().

The sets module, including sets.Set(), were first introduced in Python 
2.3 and is written in Python.

The built-in set object was introduced in Python 2.4 and is re-written 
in C for speed.

Functionally, they are identical. Speed-wise, the built-in version is 
much faster, so unless you need to support Python 2.3, always use the 
built-in set type.



-- 
Steven D'Aprano
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to