sets

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gerrit Holl

    sets

    Brett C. wrote:[color=blue]
    > 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.ImmutableS et). 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>`__[/color]

    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:


  • Raymond Hettinger

    #2
    Re: sets

    > Brett C. wrote:[color=blue][color=green]
    > > 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.ImmutableS et). The APIs are the same as the sets module sans the
    > > name change from ImmutableSet to frozenset.[/color][/color]

    "Gerrit Holl"[color=blue]
    > Will the sets module now be deprecated?[/color]

    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.

    [color=blue]
    > Or will they stay and be re-implemented so they become like UserDict,
    > UserList, UserString?[/color]

    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


    Comment

    Working...