On Jul 17, 12:34 am, candide <cand...@free.invalid> wrote: > I don't understand why some parts of the Python language (or the Python > standard library too) are implemented in C while some other parts are > implemented in the Python language itself. For instance, lists and > dictionnaries are implemented in C but sets are not. > > Wouldn't be better to implement all in C (for efficiency reasons for > example) ?
CPython's sets are implemented in C. Old versions of Python implemented sets in the 'set' module which was written in Python but that has been deprecated and removed. A lot of the standard library is implemented in Python because it makes it more easily portable to non- CPython implementations. Chard. -- http://mail.python.org/mailman/listinfo/python-list