473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

sets

Brett C. wrote:
Sets now at blazing C speeds!
-----------------------------
Raymond Hettinger implemented the sets API in C! The new built-ins are
set (which replaces sets.Set) and frozenset (which replaces
sets.ImmutableSet). The APIs are the same as the sets module sans the
name change from ImmutableSet to frozenset.

Contributing threads:
- `set() and frozenset()
<http://mail.python.org/pipermail/python-dev/2003-November/040253.html>`__


Will the sets module now be deprecated?
Or will they stay and be re-implemented so they become like UserDict,
UserList, UserString?

yours,
Gerrit.

--
147. If she have not borne him children, then her mistress may sell her
for money.
-- 1780 BC, Hammurabi, Code of Law
--
Asperger's Syndrome - a personal approach:
http://people.nl.linux.org/~gerrit/english/

Jul 18 '05 #1
1 1560
> Brett C. wrote:
Sets now at blazing C speeds!
-----------------------------
Raymond Hettinger implemented the sets API in C! The new built-ins are
set (which replaces sets.Set) and frozenset (which replaces
sets.ImmutableSet). The APIs are the same as the sets module sans the
name change from ImmutableSet to frozenset.

"Gerrit Holl" Will the sets module now be deprecated?
No, sets.py will be left alone so that existing code continues to run. Also,
sets.py continues to have value for anyone needing its autoconversion feature
that was not included for set(). Also, sets.py was made compatible with
Py2.2, so it can be shipped with code that needs to run on older pythons.

Or will they stay and be re-implemented so they become like UserDict,
UserList, UserString?


Do not expect more additions to the User**** series, the need for them was
almost completely subsumed by the ability to subclass a builtin type. One could
envision a SetMixin; however, performance considerations will be a strong force
towards always using real sets.
Raymond Hettinger
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Raymond Hettinger | last post by:
I've gotten lots of feedback on the itertools module but have not heard a peep about the new sets module. * Are you overjoyed/outraged by the choice of | and & as set operators (instead of + and...
5
by: Raymond Hettinger | last post by:
For Py2.4, I'm working on a C implementation of Sets.py with the possibility of having a set() type as a builtin. There is a question as whether the current design for set of sets has been useful....
0
by: Dave Benjamin | last post by:
Hola, I made a backport of sets.py that will run on Jython 2.1. Here is a diff against the Python 2.3 version of sets.py. The changes were simple, but I may have made a mistake here or there,...
7
by: Steve | last post by:
This post has two parts. First is my feedback on sets. (Hello? Last summer called, they want their discussion thread back...) Second is some questions about my implementation of a partition...
2
by: mkppk | last post by:
I have kind of strange change I'd like to make to the sets.Set() intersection() method.. Normally, intersection would return items in both s1 and s2 like with something like this: ...
11
by: Prateek | last post by:
I have 3 variable length lists of sets. I need to find the common elements in each list (across sets) really really quickly. Here is some sample code: # Doesn't make sense to union the sets -...
1
by: JosAH | last post by:
Greetings, Introduction This week I'll write a bit about generics (those funny angular brackets). I need an example and decided to use sets and some of their operations. This weeks' article...
6
by: happyhondje | last post by:
Hello everyone, I've got a little issue, both programming and performance-wise. I have a set, containing objects that refer to other sets. For example, in a simple notation: (<a, b, c>, <d, e>)...
17
by: Larry Bates | last post by:
You can do the following: a = del a and a = {1:'1', 2: '2', 3: '3', 4:'4', 5:'5'} del a
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.