Tipos de datos
**************

Los módulos descritos en este capítulo proporcionan una variedad de
tipos de datos especializados, como fechas y horas, matrices de tipo
fijo (*fixed-type arrays*), colas de montículos (*heap queues*), colas
de doble extremo (*double-ended queues*) y enumeraciones.

Python también proporciona algunos tipos de datos integrados,
concretamente "dict", "list", "set" y "frozenset", y "tuple". La clase
"str" se utiliza para contener cadenas de caracteres Unicode, y las
clases "bytes" y "bytearray" se utilizan para contener datos binarios.

En este capítulo se documentan los siguientes módulos:

* "datetime" --- Basic date and time types

  * Objetos conscientes (*aware*) y naífs (*naive*)

  * Constantes

    * "MINYEAR"

    * "MAXYEAR"

    * "UTC"

  * Tipos disponibles

    * Propiedades comunes

    * Determinando si un objeto es Consciente (*Aware*) o Naíf
      (*Naive*)

  * Objetos "timedelta"

    * "timedelta"

    * "min"

    * "max"

    * "resolution"

    * "days"

    * "seconds"

    * "microseconds"

    * "total_seconds()"

    * Ejemplos de uso: "timedelta"

  * Objeto "date"

    * "date"

    * "today()"

    * "fromtimestamp()"

    * "fromordinal()"

    * "fromisoformat()"

    * "fromisocalendar()"

    * "strptime()"

    * "min"

    * "max"

    * "resolution"

    * "year"

    * "month"

    * "day"

    * "replace()"

    * "timetuple()"

    * "toordinal()"

    * "weekday()"

    * "isoweekday()"

    * "isocalendar()"

    * "isoformat()"

    * "__str__()"

    * "ctime()"

    * "strftime()"

    * "__format__()"

    * Ejemplos de uso: "date"

  * Objetos "datetime"

    * "datetime"

    * "today()"

    * "now()"

    * "utcnow()"

    * "fromtimestamp()"

    * "utcfromtimestamp()"

    * "fromordinal()"

    * "combine()"

    * "fromisoformat()"

    * "fromisocalendar()"

    * "strptime()"

    * "min"

    * "max"

    * "resolution"

    * "year"

    * "month"

    * "day"

    * "hour"

    * "minute"

    * "second"

    * "microsecond"

    * "tzinfo"

    * "fold"

    * "date()"

    * "time()"

    * "timetz()"

    * "replace()"

    * "astimezone()"

    * "utcoffset()"

    * "dst()"

    * "tzname()"

    * "timetuple()"

    * "utctimetuple()"

    * "toordinal()"

    * "timestamp()"

    * "weekday()"

    * "isoweekday()"

    * "isocalendar()"

    * "isoformat()"

    * "__str__()"

    * "ctime()"

    * "strftime()"

    * "__format__()"

    * Ejemplos de uso: "datetime"

  * Objetos "time"

    * "time"

    * "min"

    * "max"

    * "resolution"

    * "hour"

    * "minute"

    * "second"

    * "microsecond"

    * "tzinfo"

    * "fold"

    * "fromisoformat()"

    * "strptime()"

    * "replace()"

    * "isoformat()"

    * "__str__()"

    * "strftime()"

    * "__format__()"

    * "utcoffset()"

    * "dst()"

    * "tzname()"

    * Ejemplos de uso: "time"

  * Objetos "tzinfo"

    * "tzinfo"

    * "utcoffset()"

    * "dst()"

    * "tzname()"

    * "fromutc()"

  * Objetos "timezone"

    * "timezone"

    * "utcoffset()"

    * "tzname()"

    * "dst()"

    * "fromutc()"

    * "utc"

  * "strftime()" and "strptime()" Behavior

    * "strftime()" and "strptime()" Format Codes

    * Detalle técnico

* "zoneinfo" --- IANA time zone support

  * Usando "ZoneInfo"

  * Fuentes de datos

    * Configurando los orígenes de datos

      * Configuración en tiempo de compilación

      * Configuración del entorno

      * Configuración de tiempo de ejecución

  * La clase "ZoneInfo"

    * "ZoneInfo"

    * "from_file()"

    * "no_cache()"

    * "clear_cache()"

    * "key"

    * Representaciones de cadenas

    * Serialización de Pickle

  * Funciones

    * "available_timezones()"

    * "reset_tzpath()"

  * Globales

    * "TZPATH"

  * Excepciones y advertencias

    * "ZoneInfoNotFoundError"

    * "InvalidTZPathWarning"

* "calendar" --- General calendar-related functions

  * "Calendar"

    * "iterweekdays()"

    * "itermonthdates()"

    * "itermonthdays()"

    * "itermonthdays2()"

    * "itermonthdays3()"

    * "itermonthdays4()"

    * "monthdatescalendar()"

    * "monthdays2calendar()"

    * "monthdayscalendar()"

    * "yeardatescalendar()"

    * "yeardays2calendar()"

    * "yeardayscalendar()"

  * "TextCalendar"

    * "formatmonth()"

    * "prmonth()"

    * "formatyear()"

    * "pryear()"

  * "HTMLCalendar"

    * "formatmonth()"

    * "formatyear()"

    * "formatyearpage()"

    * "formatmonthname()"

    * "cssclasses"

    * "cssclass_noday"

    * "cssclasses_weekday_head"

    * "cssclass_month_head"

    * "cssclass_month"

    * "cssclass_year"

    * "cssclass_year_head"

  * "LocaleTextCalendar"

  * "LocaleHTMLCalendar"

  * "setfirstweekday()"

  * "firstweekday()"

  * "isleap()"

  * "leapdays()"

  * "weekday()"

  * "weekheader()"

  * "monthrange()"

  * "monthcalendar()"

  * "prmonth()"

  * "month()"

  * "prcal()"

  * "calendar()"

  * "timegm()"

  * "day_name"

  * "day_abbr"

  * "MONDAY"

  * "TUESDAY"

  * "WEDNESDAY"

  * "THURSDAY"

  * "FRIDAY"

  * "SATURDAY"

  * "SUNDAY"

  * "Day"

  * "month_name"

  * "month_abbr"

  * "JANUARY"

  * "FEBRUARY"

  * "MARCH"

  * "APRIL"

  * "MAY"

  * "JUNE"

  * "JULY"

  * "AUGUST"

  * "SEPTEMBER"

  * "OCTOBER"

  * "NOVEMBER"

  * "DECEMBER"

  * "Month"

  * "IllegalMonthError"

    * "month"

  * "IllegalWeekdayError"

    * "weekday"

  * Uso de la línea de comandos

* "collections" --- Container datatypes

  * Objetos "ChainMap"

    * "ChainMap"

      * "maps"

      * "new_child()"

      * "parents"

    * Ejemplos y recetas "ChainMap"

  * Objetos "Counter"

    * "Counter"

      * "elements()"

      * "most_common()"

      * "subtract()"

      * "total()"

      * "fromkeys()"

      * "update()"

  * Objetos "deque"

    * "deque"

      * "append()"

      * "appendleft()"

      * "clear()"

      * "copy()"

      * "count()"

      * "extend()"

      * "extendleft()"

      * "index()"

      * "insert()"

      * "pop()"

      * "popleft()"

      * "remove()"

      * "reverse()"

      * "rotate()"

      * "maxlen"

    * Recetas "deque"

  * Objetos "defaultdict"

    * "defaultdict"

      * "__missing__()"

      * "default_factory"

    * Ejemplos "defaultdict"

  * "namedtuple()" Funciones *Factory* para Tuplas y Campos con
    Nombres

    * "namedtuple()"

    * "_make()"

    * "_asdict()"

    * "_replace()"

    * "_fields"

    * "_field_defaults"

  * Objetos "OrderedDict"

    * "OrderedDict"

      * "popitem()"

      * "move_to_end()"

    * Ejemplos y recetas "OrderedDict"

  * Objetos "UserDict"

    * "UserDict"

      * "data"

  * Objetos "UserList"

    * "UserList"

      * "data"

  * Objetos "UserString"

    * "UserString"

      * "data"

* "collections.abc" --- Abstract Base Classes for Containers

  * Colecciones clases base abstractas

  * Colecciones Clases base abstractas - Descripciones detalladas

    * "Container"

    * "Hashable"

    * "Sized"

    * "Callable"

    * "Iterable"

    * "Collection"

    * "Iterator"

    * "Reversible"

    * "Generator"

    * "Sequence"

    * "MutableSequence"

    * "Set"

    * "MutableSet"

    * "Mapping"

    * "MutableMapping"

    * "MappingView"

    * "ItemsView"

    * "KeysView"

    * "ValuesView"

    * "Awaitable"

    * "Coroutine"

    * "AsyncIterable"

    * "AsyncIterator"

    * "AsyncGenerator"

    * "Buffer"

  * Ejemplos y Recetas

* "heapq" --- Heap queue algorithm

  * "heappush()"

  * "heappop()"

  * "heappushpop()"

  * "heapify()"

  * "heapreplace()"

  * "merge()"

  * "nlargest()"

  * "nsmallest()"

  * Ejemplos Básicos

  * Notas de Aplicación de la Cola de Prioridades

  * Teoría

* "bisect" --- Array bisection algorithm

  * "bisect_left()"

  * "bisect_right()"

  * "bisect()"

  * "insort_left()"

  * "insort_right()"

  * "insort()"

  * Notas de rendimiento

  * Búsqueda en listas ordenadas

  * Ejemplos

* "array" --- Efficient arrays of numeric values

  * "typecodes"

  * "array"

    * "typecode"

    * "itemsize"

    * "append()"

    * "buffer_info()"

    * "byteswap()"

    * "count()"

    * "extend()"

    * "frombytes()"

    * "fromfile()"

    * "fromlist()"

    * "fromunicode()"

    * "index()"

    * "insert()"

    * "pop()"

    * "remove()"

    * "clear()"

    * "reverse()"

    * "tobytes()"

    * "tofile()"

    * "tolist()"

    * "tounicode()"

* "weakref" --- Referencias débiles

  * "ref"

    * "__callback__"

  * "proxy()"

  * "getweakrefcount()"

  * "getweakrefs()"

  * "WeakKeyDictionary"

  * "keyrefs()"

  * "WeakValueDictionary"

  * "valuerefs()"

  * "WeakSet"

  * "WeakMethod"

  * "finalize"

    * "__call__()"

    * "detach()"

    * "peek()"

    * "alive"

    * "atexit"

  * "ReferenceType"

  * "ProxyType"

  * "CallableProxyType"

  * "ProxyTypes"

  * Objetos de referencias débiles

  * Ejemplo

  * Objetos finalizadores

  * Comparando finalizadores con los métodos "__del__()"

* "types" --- Dynamic type creation and names for built-in types

  * Creación dinámica de tipos

    * "new_class()"

    * "prepare_class()"

    * "resolve_bases()"

    * "get_original_bases()"

  * Tipos de Intérpretes Estándar

    * "NoneType"

    * "FunctionType"

    * "LambdaType"

    * "GeneratorType"

    * "CoroutineType"

    * "AsyncGeneratorType"

    * "CodeType"

    * "CellType"

    * "MethodType"

    * "BuiltinFunctionType"

    * "BuiltinMethodType"

    * "WrapperDescriptorType"

    * "MethodWrapperType"

    * "NotImplementedType"

    * "MethodDescriptorType"

    * "ClassMethodDescriptorType"

    * "ModuleType"

    * "EllipsisType"

    * "GenericAlias"

    * "UnionType"

    * "TracebackType"

    * "FrameType"

    * "GetSetDescriptorType"

    * "MemberDescriptorType"

    * "MappingProxyType"

      * "copy()"

      * "get()"

      * "items()"

      * "keys()"

      * "values()"

    * "CapsuleType"

  * Clases y funciones de utilidad adicionales

    * "SimpleNamespace"

    * "DynamicClassAttribute()"

  * Funciones de utilidad de corutina

    * "coroutine()"

* "copy" --- Shallow and deep copy operations

  * "copy()"

  * "deepcopy()"

  * "replace()"

  * "Error"

  * "__copy__()"

  * "__deepcopy__()"

  * "__replace__()"

* "pprint" --- Data pretty printer

  * Functions

    * "pp()"

    * "pprint()"

    * "pformat()"

    * "isreadable()"

    * "isrecursive()"

    * "saferepr()"

  * Objetos *PrettyPrinter*

    * "PrettyPrinter"

    * "pformat()"

    * "pprint()"

    * "isreadable()"

    * "isrecursive()"

    * "format()"

  * Ejemplo

* "reprlib" --- Alternate "repr()" implementation

  * "Repr"

  * "aRepr"

  * "repr()"

  * "recursive_repr()"

  * Objetos Repr

    * "fillvalue"

    * "maxlevel"

    * "maxdict"

    * "maxlist"

    * "maxtuple"

    * "maxset"

    * "maxfrozenset"

    * "maxdeque"

    * "maxarray"

    * "maxlong"

    * "maxstring"

    * "maxother"

    * "indent"

    * "repr()"

    * "repr1()"

  * Subclasificando Objetos Repr

* "enum" --- Support for enumerations

  * Contenido del Módulo

  * Tipos de datos

    * "EnumType"

      * "__call__()"

      * "__contains__()"

      * "__dir__()"

      * "__getitem__()"

      * "__iter__()"

      * "__len__()"

      * "__members__"

      * "__reversed__()"

      * "_add_alias_()"

      * "_add_value_alias_()"

    * "Enum"

      * "name"

      * "value"

      * "_name_"

      * "_value_"

      * "_order_"

      * "_ignore_"

      * "__dir__()"

      * "_generate_next_value_()"

      * "__init__()"

      * "__init_subclass__()"

      * "_missing_()"

      * "__new__()"

      * "__repr__()"

      * "__str__()"

      * "__format__()"

    * "IntEnum"

    * "StrEnum"

    * "Flag"

      * "__contains__()"

      * "__or__()"

      * "__and__()"

      * "__xor__()"

      * "_numeric_repr_()"

    * "IntFlag"

    * "ReprEnum"

    * "EnumCheck"

      * "UNIQUE"

      * "CONTINUOUS"

      * "NAMED_FLAGS"

    * "FlagBoundary"

      * "STRICT"

      * "CONFORM"

      * "EJECT"

      * "KEEP"

    * Nombres soportados "__dunder__"

    * Nombres "_sunder_" compatibles

  * Utilidades y decoradores

    * "auto"

    * "property()"

    * "unique()"

    * "verify()"

    * "member()"

    * "nonmember()"

    * "global_enum()"

    * "show_flag_values()"

  * Notas

* "graphlib" --- Functionality to operate with graph-like structures

  * "TopologicalSorter"

    * "add()"

    * "prepare()"

    * "is_active()"

    * "done()"

    * "get_ready()"

    * "static_order()"

  * Excepciones

    * "CycleError"
