데이터형
********

이 장에서 설명하는 모듈은 날짜와 시간, 고정형 배열, 힙 큐, 데크, 열거
형과 같은 다양한 특수 데이터형을 제공합니다.

파이썬은 또한 일부 내장 데이터형, 특히 "dict", "list", "set"과
"frozenset", "tuple"을 제공합니다. "str" 클래스는 유니코드 문자열을 저
장하는 데 사용되고, "bytes"와 "bytearray" 클래스는 바이너리 데이터를
저장하는 데 사용됩니다.

이 장에서는 다음 모듈에 관해 설명합니다:

* "datetime" --- 기본 날짜와 시간 형

  * 어웨어와 나이브 객체

  * 상수

  * 사용 가능한 형

    * 공통 속성

    * 객체가 어웨어한지 나이브한지 판단하기

  * "timedelta" 객체

    * 사용 예: "timedelta"

  * "date" 객체

    * 사용 예: "date"

  * "datetime" 객체

    * 사용 예: "datetime"

  * "time" 객체

    * 사용 예: "time"

  * "tzinfo" 객체

  * "timezone" 객체

  * "strftime()"과 "strptime()" 동작

    * "strftime()"과 "strptime()" 포맷 코드

    * 기술적 세부 사항

* "calendar" --- 일반 달력 관련 함수

* "collections" --- Container datatypes

  * "ChainMap" objects

    * "ChainMap" Examples and Recipes

  * "Counter" objects

  * "deque" objects

    * "deque" Recipes

  * "defaultdict" objects

    * "defaultdict" Examples

  * "namedtuple()" Factory Function for Tuples with Named Fields

  * "OrderedDict" objects

    * "OrderedDict" Examples and Recipes

  * "UserDict" objects

  * "UserList" objects

  * "UserString" objects

* "collections.abc" --- 컨테이너의 추상 베이스 클래스

  * Collections 추상 베이스 클래스

* "heapq" --- Heap queue algorithm

  * Basic Examples

  * Priority Queue Implementation Notes

  * Theory

* "bisect" --- 배열 이진 분할 알고리즘

  * 정렬된 리스트 검색하기

  * 다른 예제

* "array" --- 효율적인 숫자 배열

* "weakref" --- 약한 참조

  * 약한 참조 객체

  * 예

  * 파이널라이저 객체

  * 파이널라이저와 "__del__()" 메서드의 비교

* "types" --- 동적 형 생성과 내장형 이름

  * 동적 형 생성

  * 표준 인터프리터 형

  * 추가 유틸리티 클래스와 함수

  * 코루틴 유틸리티 함수

* "copy" --- 얕은 복사와 깊은 복사 연산

* "pprint" --- 예쁜 데이터 인쇄기

  * PrettyPrinter 객체

  * 예제

* "reprlib" --- 대안 "repr()" 구현

  * Repr 객체

  * Repr 객체 서브 클래싱

* "enum" --- Support for enumerations

  * Module Contents

  * Creating an Enum

  * Programmatic access to enumeration members and their attributes

  * Duplicating enum members and values

  * Ensuring unique enumeration values

  * Using automatic values

  * Iteration

  * Comparisons

  * Allowed members and attributes of enumerations

  * Restricted Enum subclassing

  * Pickling

  * Functional API

  * Derived Enumerations

    * IntEnum

    * IntFlag

    * Flag

    * Others

  * When to use "__new__()" vs. "__init__()"

  * Interesting examples

    * Omitting values

      * Using "auto"

      * Using "object"

      * Using a descriptive string

      * Using a custom "__new__()"

    * OrderedEnum

    * DuplicateFreeEnum

    * Planet

    * TimePeriod

  * How are Enums different?

    * Enum Classes

    * Enum Members (aka instances)

    * Finer Points

      * Supported "__dunder__" names

      * Supported "_sunder_" names

      * "Enum" member type

      * Boolean value of "Enum" classes and members

      * "Enum" classes with methods

      * Combining members of "Flag"
