牌語備忘録 -pygo

あくまでもメモです。なるべくオフィシャルの情報を参照してください。

牌語備忘録 -pygo

Index: Structure and Interpretation of Computer Programs (Python ver.)

SICP taught in Python 3
http://www-inst.eecs.berkeley.edu/~cs61a/sp12/book/index.html

Chapter 1: Building Abstractions with Functions

    • 1.1 Introduction
      • 1.1.1 Programming in Python
      • 1.1.2 Installing Python 3
      • 1.1.3 Interactive Sessions
      • 1.1.4 First Example
      • 1.1.5 Practical Guidance: Errors
    • 1.2 The Elements of Programming
      • 1.2.1 Expressions
      • 1.2.2 Call Expressions
      • 1.2.3 Importing Library Functions
      • 1.2.4 Names and the Environment
      • 1.2.5 Evaluating Nested Expressions
      • 1.2.6 Function Diagrams
    • 1.3 Defining New Functions
      • 1.3.1 Environments
      • 1.3.2 Calling User-Defined Functions
      • 1.3.3 Example: Calling a User-Defined Function
      • 1.3.4 Local Names
      • 1.3.5 Practical Guidance: Choosing Names
      • 1.3.6 Functions as Abstractions
      • 1.3.7 Operators
    • 1.4 Practical Guidance: The Art of the Function
      • 1.4.1 Docstrings
      • 1.4.2 Default Argument Values
    • 1.5 Control
      • 1.5.1 Statements
      • 1.5.2 Compound Statements
      • 1.5.3 Defining Functions II: Local Assignment
      • 1.5.4 Conditional Statements
      • 1.5.5 Iteration
      • 1.5.6 Practical Guidance: Testing
    • 1.6 Higher-Order Functions
      • 1.6.1 Functions as Arguments
      • 1.6.2 Functions as General Methods
      • 1.6.3 Defining Functions III: Nested Definitions
      • 1.6.4 Functions as Returned Values
      • 1.6.5 Lambda Expressions
      • 1.6.6 Example: Newton's Method
      • 1.6.7 Abstractions and First-Class Functions
      • 1.6.8 Function Decorators

Chapter 2: Building Abstractions with Objects

    • 2.1 Introduction
      • 2.1.1 The Object Metaphor
      • 2.1.2 Native Data Types
    • 2.2 Data Abstraction
      • 2.2.1 Example: Arithmetic on Rational Numbers
      • 2.2.2 Tuples
      • 2.2.3 Abstraction Barriers
      • 2.2.4 The Properties of Data
    • 2.3 Sequences
      • 2.3.1 Nested Pairs
      • 2.3.2 Recursive Lists
      • 2.3.3 Tuples II
      • 2.3.4 Sequence Iteration
      • 2.3.5 Sequence Abstraction
      • 2.3.6 Strings
      • 2.3.7 Conventional Interfaces
    • 2.4 Mutable Data
      • 2.4.1 Local State
      • 2.4.2 The Benefits of Non-Local Assignment
      • 2.4.3 The Cost of Non-Local Assignment
      • 2.4.4 Lists
      • 2.4.5 Dictionaries
      • 2.4.6 Example: Propagating Constraints
    • 2.5 Object-Oriented Programming
      • 2.5.1 Objects and Classes
      • 2.5.2 Defining Classes
      • 2.5.3 Message Passing and Dot Expressions
      • 2.5.4 Class Attributes
      • 2.5.5 Inheritance
      • 2.5.6 Using Inheritance
      • 2.5.7 Multiple Inheritance
      • 2.5.8 The Role of Objects
    • 2.6 Implementing Classes and Objects
      • 2.6.1 Instances
      • 2.6.2 Classes
      • 2.6.3 Using Implemented Objects
    • 2.7 Generic Operations
      • 2.7.1 String Conversion
      • 2.7.2 Multiple Representations
      • 2.7.3 Generic Functions

Chapter 3: The Structure and Interpretation of Computer Programs

    • 3.1 Introduction
      • 3.1.1 Programming Languages
    • 3.2 Functions and the Processes They Generate
      • 3.2.1 Recursive Functions
      • 3.2.2 The Anatomy of Recursive Functions
      • 3.2.3 Tree Recursion
      • 3.2.4 Example: Counting Change
      • 3.2.5 Orders of Growth
      • 3.2.6 Example: Exponentiation
    • 3.3 Recursive Data Structures
      • 3.3.1 Processing Recursive Lists
      • 3.3.2 Hierarchical Structures
      • 3.3.3 Sets
    • 3.4 Exceptions
      • 3.4.1 Exception Objects
    • 3.5 Interpreters for Languages with Combination
      • 3.5.1 Calculator
      • 3.5.2 Parsing
    • 3.6 Interpreters for Languages with Abstraction
      • 3.6.1 The Logo Language
      • 3.6.2 Structure
      • 3.6.3 Environments
      • 3.6.4 Data as Programs

Chapter 4: Distributed and Parallel Computing

    • 4.1 Introduction
    • 4.2 Distributed Computing
      • 4.2.1 Client/Server Systems
      • 4.2.2 Peer-to-peer Systems
      • 4.2.3 Modularity
      • 4.2.4 Message Passing
      • 4.2.5 Messages on the World Wide Web
    • 4.3 Parallel Computing
      • 4.3.1 The Problem with Shared State
      • 4.3.2 Correctness in Parallel Computation
      • 4.3.3 Protecting Shared State: Locks and Semaphores
      • 4.3.4 Staying Synchronized: Condition variables
      • 4.3.5 Deadlock

Chapter 5: Sequences and Coroutines

    • 5.1 Introduction
    • 5.2 Implicit Sequences
      • 5.2.1 Python Iterators
      • 5.2.2 For Statements
      • 5.2.3 Generators and Yield Statements
      • 5.2.4 Iterables
      • 5.2.5 Streams
    • 5.3 Coroutines
      • 5.3.1 Python Coroutines
      • 5.3.2 Produce, Filter, and Consume
      • 5.3.3 Multitasking