SICP — Scheme/JS Structure and Interpretation of Computer Programs — Comparison Edition
Original Python
Original Python

[1] Conditionals in full Python accept any value, not just a boolean, as the result of evaluating the predicate expression. Python's notion of truthiness and falsiness is captured by the following variants of is_truthy and is_falsy: def is_truthy(x): return not is_falsy(x) def is_falsy(x): return x is None or x is False or x == 0 or x == '' In other words, the values None, False, the number 0 and the empty string are falsy, and all other values are truthy.
[2] Frames are not really a data abstraction in the following code: abstraction: set-variable-value! and define-variable! use set-car! to directly modify the values in a frame. The function assign_symbol_value below uses set_head and add_binding_to_frame (which uses set_head and set_tail) to directly modify the symbols and values in a frame. The purpose of the frame procedures functions is to make the environment-manipulation procedures functions easy to read.
[3] The drawback of this representation (as well as the variant in exercise 4.7) is that the evaluator may have to search through many frames in order to find the binding for a given variable. (Such an approach is referred to as deep binding.) One way to avoid this inefficiency is to make use of a strategy called lexical addressing, which will be discussed in section .
4.1.3   Evaluator Data Structures