# Ordered Set Recipe

class sortedcollections.OrderedSet(iterable=())

  Like OrderedDict, OrderedSet maintains the insertion order of elements.

  For example:

      >>> ordered_set = OrderedSet('abcde')
      >>> list(ordered_set) == list('abcde')
      True
      >>> ordered_set = OrderedSet('edcba')
      >>> list(ordered_set) == list('edcba')
      True

  OrderedSet also implements the collections.Sequence interface.

  __contains__(key)

    `key in ordered_set`

  __getitem__(index)

    `ordered_set[index]` -> element; lookup element at index.

  __init__(iterable=())
  __iter__()

    `iter(ordered_set)`

  __len__()

    `len(ordered_set)`

  __repr__()

    Text representation of set.

  __reversed__()

    `reversed(ordered_set)`

  __str__()

    Text representation of set.

  __weakref__

    list of weak references to the object

  add(value)

    Add element, value, to set.

  count(key)

    `key in ordered_set`

  discard(value)

    Remove element, value, from set if it is a member.

  index(value)

    Return index of value.