Python 언어 레퍼런스
Python 언어 레퍼런스
이 레퍼런스 매뉴얼은 파이썬 언어의 문법(syntax)과 핵심 의미(core semantics)를 설명해요. 긴장하게 쓰여 있지만, 최대한 정확하고 완전하게 하려고 노력했어요. 그 외에 내장 객체 타입과 함수는 「Python 빌트인 레퍼런스」에서, 표준 라이브러리 모듈은 「파이썬 표준 라이브러리」에서 설명해요.
언어에 대한 비공식적인 소개가 필요하다면 「파이썬 튜토리얼」을 보면 돼요. C나 C++ 프로그래머라면 두 가지 추가 매뉴얼도 참고할 수 있어요:
- 「파이썬 인터프리터 확장 및 내장」(Extending and Embedding the Python Interpreter): 파이썬 확장 모듈을 작성하는 방법의 전체 그림을 설명해요.
- 「파이썬/C API 레퍼런스 매뉴얼」(Python/C API reference manual): C/C++ 프로그래머가 사용할 수 있는 인터페이스를 자세히 설명해요.
출처: Python 언어 레퍼런스
본문
다음은 언어 레퍼런스 전체 목차예요. 각 장(章)과 절(節)로 구성된 구조를 그대로 살려봤어요.
- 소개 (Introduction)
- 1.1. 대체 구현 (Alternate Implementations)
- 1.2. 표기법 (Notation)
- 어휘 분석 (Lexical analysis)
- 2.1. 줄 구조 (Line structure)
- 2.2. 기타 토큰 (Other tokens)
- 2.3. 이름 (식별자와 키워드, Names)
- 2.4. 리터럴 (Literals)
- 2.5. 문자열과 바이트 리터럴 (String and Bytes literals)
- 2.6. 숫자 리터럴 (Numeric literals)
- 2.7. 연산자와 구분자 (Operators and delimiters)
- 데이터 모델 (Data model)
- 3.1. 객체, 값, 타입 (Objects, values and types)
- 3.2. 표준 타입 계층 (The standard type hierarchy)
- 3.3. 특수 메서드 이름 (Special method names)
- 3.4. 코루틴 (Coroutines)
- 실행 모델 (Execution model)
- 4.1. 프로그램의 구조 (Structure of a program)
- 4.2. 이름 짓기와 바인딩 (Naming and binding)
- 4.3. 예외 (Exceptions)
- 4.4. 런타임 구성 요소 (Runtime Components)
- 임포트 시스템 (The import system)
- 5.1. importlib
- 5.2. 패키지 (Packages)
- 5.3. 검색 (Searching)
- 5.4. 로딩 (Loading)
- 5.5. 경로 기반 파인더 (The Path Based Finder)
- 5.6. 표준 임포트 시스템 교체 (Replacing the standard import system)
- 5.7. 패키지 상대 임포트 (Package Relative Imports)
- 5.8.
__main__에 대한 특별 고려 사항 (Special considerations for main) - 5.9. 참고 문헌 (References)
- 표현식 (Expressions)
- 6.1. 산술 변환 (Arithmetic conversions)
- 6.2. 원자 (Atoms)
- 6.3. 기본식 (Primaries)
- 6.4. await 표현식 (Await expression)
- 6.5. 거듭제곱 연산자 (The power operator)
- 6.6. 단항 산술·비트 연산 (Unary arithmetic and bitwise operations)
- 6.7. 이항 산술 연산 (Binary arithmetic operations)
- 6.8. 시프트 연산 (Shifting operations)
- 6.9. 이항 비트 연산 (Binary bitwise operations)
- 6.10. 비교 (Comparisons)
- 6.11. 불리언 연산 (Boolean operations)
- 6.12. 할당 표현식 (Assignment expressions)
- 6.13. 조건 표현식 (Conditional expressions)
- 6.14. 람다 (Lambdas)
- 6.15. 표현식 목록 (Expression lists)
- 6.16. 평가 순서 (Evaluation order)
- 6.17. 연산자 우선순위 (Operator precedence)
- 단순 문장 (Simple statements)
- 7.1. 표현식 문장 (Expression statements)
- 7.2. 할당 문장 (Assignment statements)
- 7.3. assert 문 (The assert statement)
- 7.4. pass 문 (The pass statement)
- 7.5. del 문 (The del statement)
- 7.6. return 문 (The return statement)
- 7.7. yield 문 (The yield statement)
- 7.8. raise 문 (The raise statement)
- 7.9. break 문 (The break statement)
- 7.10. continue 문 (The continue statement)
- 7.11. import 문 (The import statement)
- 7.12. global 문 (The global statement)
- 7.13. nonlocal 문 (The nonlocal statement)
- 7.14. type 문 (The type statement)
- 복합 문장 (Compound statements)
- 8.1. if 문 (The if statement)
- 8.2. while 문 (The while statement)
- 8.3. for 문 (The for statement)
- 8.4. try 문 (The try statement)
- 8.5. with 문 (The with statement)
- 8.6. match 문 (The match statement)
- 8.7. 함수 정의 (Function definitions)
- 8.8. 클래스 정의 (Class definitions)
- 8.9. 코루틴 (Coroutines)
- 8.10. 타입 매개변수 목록 (Type parameter lists)
- 8.11. 애너테이션 (Annotations)
- 최상위 구성 요소 (Top-level components)
- 9.1. 완전한 파이썬 프로그램 (Complete Python programs)
- 9.2. 파일 입력 (File input)
- 9.3. 대화형 입력 (Interactive input)
- 9.4. 표현식 입력 (Expression input)
- 전체 문법 명세 (Full Grammar specification)
더 알아보기
- 언어에 대한 비공식적인 소개는 「파이썬 튜토리얼」을 봐 주세요.
- 내장 객체 타입과 함수는 「파이썬 빌트인 레퍼런스」에서 확인할 수 있어요.
- 표준 라이브러리 모듈은 「파이썬 표준 라이브러리」에서 설명해요.