Glossary
--------

.. glossary::

    Comparable
      A quality of certain types where one value can be checked to see if it is greater than, less than, or equal to another value of the same type. Types which are comparable can be put in a list and sorted.

    Data structure
      A collection of related values, often organized in lists, dictionaries, tuples, etc.

    DSU
      Abbreviation of "decorate-sort-undecorate", a pattern that involves building a list of tuples, sorting, and extracting part of the result.

    Gather
      The operation of assembling a variable-length argument tuple.

    Hashable
      A type that has a hash function. Immutable types like integers, floats, and strings are hashable; mutable types like lists and dictionaries are not.

    Shape (of a data structure)
      A summary of the type, size, and composition of a data structure.

    Singleton
      A list (or other sequence) with a single element.

    Tuple
      An immutable sequence of elements.

    Tuple assignment
      An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated and then its elements are assigned to the variables on the left.

.. dragndrop:: chapter_ten_glossary_one
   :feedback: If you're stuck, look above for the definitions of these terms! Try again.
   :match_1: comparable|||A type where one value can be checked to see if it is greater than, less than, or equal to another value of the same type. Types which are comparable can be put in a list and sorted.
   :match_2: data structure|||A collection of related values, often organized in lists, dictionaries, tuples, etc.
   :match_3: DSU|||Abbreviation of "decorate-sort-undecorate", a pattern that involves building a list of tuples, sorting, and extracting part of the result.
   :match_4: gather|||The operation of assembling a variable-length argument tuple.
   :match_5: hashable|||A type that has a hash function. Immutable types like integers, floats, and strings are hashable; mutable types like lists and dictionaries are not.

   Match the terms on the left with their defintions on the right.

.. dragndrop:: chapter_ten_glossary_two
   :feedback: If you're stuck, look above for the definitions of these terms! Try again.
   :match_1: shape(of a data structure)|||A summary of the type, size, and composition of a data structure.
   :match_2: singleton|||A list (or other sequence) with a single element.
   :match_3: tuple|||An immutable sequence of elements.
   :match_4: tuple assignment|||An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated and then its elements are assigned to the variables on the left.

   Match the terms on the left with their defintions on the right.
