Python (2.7)
Analysis against Python 2.7 (released 2010-07-03, final release 2.7.18 on 2020-04-20): print is a statement, str is bytes, async does not exist, and dict iteration order is unspecified. The family’s Python 3.14 page assesses the current release.
This assessment applies the coupling account — coupling as access to a shared resource, and the coupling floor [1], [2] — and the knowledge-embodiment theorem [3]; the language is assessed against its official reference [4].
Snapshot Python 2.7 — released 3 July 2010 · lifecycle retired (The Python 2 series ended on 2020-04-20 with 2.7.18; no further release or security fix is planned.)
Family Python — shelf: Application
The language’s main business is building general application software, with a managed runtime or a rich standard library. A shelf groups; it does not classify — the tags below carry every use, paradigm, and platform of this snapshot.
Trajectory 0.9 (20 February 1991 — first public release) · 2.7 (3 July 2010 — last release of the Python 2 line: print statement, str as bytes, no type hints — assessed release) · 3.14 (7 October 2025 — assessed release)
Tags
Use — Application, Web back end, Data and statistics, Scripting
Paradigm — Object-oriented, Imperative, Procedural
Lifecycle — Retired
Memory — Managed (GC)
Typing — Dynamic
Resources
The language’s official entry points, and the documents that name the release this page assesses. A link marked this release pins the document to Python 2.7; an unmarked link is the current reference for the language.
Landing page
Specification and reference
API documentation
- The Python Standard Library
- Python 2.7 documentation this release
Tutorial
Release notes
- What’s new in Python 2.7 this release
1 Assessment
This page assesses Python 2.7 in five parts: core coupling — what the language’s own constructs force; ecosystem coupling — what the surrounding platform, tooling, and community cost; engineering readiness — whether the artifact can be reproduced, verified, observed, worked in quickly, connected to other languages, and governed openly; the profile — the unscored facts a score cannot express; and the scoring detail — the mechanism marks and the arithmetic behind every score. A ✅ bullet marks a construct that helps. A ⚠️ or ❌ bullet marks a cost; the scoring model does not price every cost named here.
Core coupling 55.1/100 · Ecosystem coupling 72.3/100 · Engineering readiness 79.5/100
1.1 Core coupling
1.1.1 Type
- ❌ Dynamic typing: the type of a value is whatever the run time finds, so every agreement is deferred to execution (T1)
- ❌ The call target is chosen from the value: a method name must exist on every object that arrives at the site (T3)
- ❌ No sum type: an alternative is a sentinel, a
None, or a tuple with a tag, and exhaustiveness stays a convention (T4) - ❌ No type parameter: an algorithm over several types duplicates or falls back on one universal object (T5)
- ❌
Noneis an ordinary value: no signature says a value may be absent, and each consumer writes the guard (T10) - ❌ A signature states no effects: a call may read a file, mutate a module global, and raise, and the signature names only the return value (T12)
- ❌
ctypesis an unchecked boundary: a hand-written declaration states the C layout, and nothing validates it (T14)
1.1.2 Construction
- ❌ A module-level name is a global: a function writes the caller’s namespace through
global, and any module can reach the name (C1) - ❌ Bindings are mutable by default: nothing states that a name or an attribute will not change (C2)
- ❌ Dictionary order is the hash’s: the 2.7 reference states that the order of
dictkeys is unspecified, and insertion order becomes a promise only in 3.7 (C5) - ⚠️
__init__may run side effects: construction and initialisation are one call, and a subclass shares the base’s path - ❌ One value, many names: names bind objects, and a parameter, a closure, and an attribute can hold the same list (C6)
- ❌ The import system executes a module once, at first import; a circular import hands the importer the half-initialized module (C8)
1.1.3 Memory
- ✅ Reference counting reclaims at the last reference: most objects are released as soon as nothing names them
- ⚠️ A cycle needs the collector: a reference loop waits for the periodic pass
- ⚠️
__del__timing is not a release path: a finalizer is unreliable for a resource - ❌ No release runs at scope exit:
withreleases only the context managers that exist, and a lock or a file acquired outside one has no scope rule (M3) - ⚠️ A module global extends a lifetime: a name held at module level keeps its object alive for the process
- ⚠️ No handle names its owner: any two names reach the same mutable object (M4)
1.1.4 Error
- ✅
try/exceptcarries a failure to the frame that handles it: a raise is a value that unwinds (Er1) - ❌ A failure may arrive undeclared: a raised exception needs no signature entry, and no caller is required to handle it (Er2)
- ⚠️ A bare
exceptcatches everything: the declaration is the handler’s choice, not the raiser’s - ❌ A failure is not a value: a
raisecannot be folded into an expression, so each level rebuilds thetry/exceptshape around the call (Er4)
1.1.5 Concurrency
- ❌ The interpreter lock serialises bytecode: a CPU-bound program must leave the language, through a process or a native extension, to use a second core (K1)
- ❌ Shared state is the default: a global or an attribute is reachable from every thread (K2)
- ❌ Nothing detects a race: the lock discipline is an agreement across modules (K3)
- ❌ No scope joins a thread:
threading.Threadis started and joined by hand, so a task can outlive the code that started it (K4)
1.1.6 Platform
- ✅ No company owns the language: Python is governed by the Python Software Foundation
- ✅ Several implementations exist: CPython, PyPy, Jython, and IronPython are separate runtimes
- ✅ The runtime is portable: CPython builds on the era’s operating systems and on many others
- ✅ The packaging tools are vendor-neutral: the package index and the installer are not tied to one vendor
1.1.7 Trade-offs (not coupling)
- Readable syntax vs. hidden rules: the indentation that makes the code readable is also the rule a mixed file breaks silently
- A batteries-included library vs. an audit surface: the standard library is large and stable, so a reviewer decides which of its modules are still the right place for a job
- Comprehensions vs. the loop: an expression that builds a list hides the accumulation in one line, and a reader who needs the loop’s control flow rewrites it
1.2 Ecosystem coupling
1.2.1 Performance
- ❌ Interpreted: the bytecode dispatch, not the algorithm, decides the shape of a hot loop (R1)
- ⚠️ A C extension helps and binds the program to the C ecosystem: the fast path is a native module
- ⚠️ Object overhead is high: an integer and a list are heap objects
1.2.2 Ecosystem
- ✅ The package index holds the ecosystem: a dependency is fetched by the installer
- ✅ The tooling is settled: pip, virtualenv, and setuptools cover the workflow
- ❌ A wheel binds to an interpreter: the filename names the Python, ABI, and platform tags, and the installer loads that binary [5], [6] (Ec8)
- ❌ Stored byte-code binds to the release: the marshal format carries a magic number per release and no cross-release promise [7] (Ec9)
1.2.3 Evolution
- ❌ The Python 3 split:
printbecomes a function,strbecomes text, division changes meaning, and the standard library is reorganised, so a 2.7 codebase is revisited across the boundary (V1) - ❌ No steward for the line: the series is retired, so a defect in 2.7 is permanent and the only migration path lies outside it (V3)
- ✅ A bug-fix-only line: 2.7 added no new syntax after 2.7.0, so the definition of the line is stable
1.2.4 Domain
- ✅ Data analysis is the language’s main work: NumPy, SciPy, and pandas run on 2.7
- ✅ Scripting and automation: a short program drives an operating system or another program
- ✅ A web back end is built from it: Django and its peers run on the release
1.2.5 Learning
- ✅ A gentle start: the syntax reads as executable pseudocode
- ✅ A large literature: tutorials and courses exist for every level
1.2.6 Syntax
- ✅ Indentation carries the block: the structure is the layout
- ⚠️ Indentation is also the failure: a mixed tab and space is a syntax error the reader cannot see
1.2.7 Testing
- ✅
unittestships with the runtime, and pytest is a standard dependency: a runner and an assertion library are available - ✅
pdbships with the runtime: the toolchain steps through the source - ❌ A mistake is found on the path that runs: the compiler decides nothing, so coverage is the only evidence of safety (G3)
- ❌ The only published clock is the wall:
time.timereads the operator’s calendar, andtime.clockreports processor time rather than elapsed time (G4)
1.2.8 Security
- ✅ No pointer is available: a buffer overflow and a use-after-free are not expressible (Q1)
- ❌ A value from outside arrives with no declared type: keeping it away from a dangerous operation is the programmer’s check (Q2)
- ❌
evalandexecturn text into code: a data path can become a control path (Q3)
1.2.9 Delivery targets
What ships from a producer to a consumer, and whether the interface across a release boundary is promised. Ec8 is present when one compiled target crosses with no promise.
| Target | Ships as | Crosses a producer boundary | Cross-release promise |
|---|---|---|---|
| sdist | source | no | A source distribution builds on the target machine |
| wheel | compiled | yes | no — The wheel filename names the interpreter, ABI, and platform tags, and pip installs that binary [5] [6] |
1.2.10 Stored data formats
What the toolchain stores that outlives the program, and what the vendor publishes about reading it across a release boundary. Ec9 is present when one row carries a break: the reading promise published as broken, the writing direction published as unreadable elsewhere, or a break the probe harness has reproduced.
| Stored format | Reading promise | Writing promise |
|---|---|---|
| pickle stream — stored objects | yes — Python publishes the promise for pickled data: the format is guaranteed backwards compatible across Python releases provided a compatible pickle protocol is chosen, and each protocol version is named for the release that first reads it [7] | — |
| .pyc — marshal format | recorded, not priced — Python states that the marshal serialization format is not guaranteed to be portable across Python versions, and that the implementers reserve the right to change it in non-backwards compatible ways [7] | published break |
1.3 Engineering readiness
1.3.1 Reproducibility
- ❌ Builds are not byte-reproducible by default: archive metadata and build paths reach the artifact (Y1)
- ❌ Dependencies resolve without a lock: an unpinned requirement is resolved from the index at install time (Y2)
- ⚠️ The interpreter is not pinned by the project: the release is left to a virtual environment or an image (Y14)
1.3.2 Supply chain
- ✅ The index publishes signed metadata: the installer verifies a package’s origin (Y3)
- ❌ The index is a flat name space: a name is a first claim, and a dependency can be redirected without a change in the consumer’s source (Y4)
- ✅ A vulnerability feed joins advisories to package versions: OSV covers this registry (Y16)
1.3.3 Observability
- ✅ The instrumentation standard publishes an implementation: traces and metrics have a stable expressed form (Y5)
1.3.4 Feedback
- ✅ The edit is the run: no build step sits between a change and its effect (Y7)
1.3.5 Interop
- ✅ A general foreign-function interface exists:
ctypesand the C extension API reach native code in process (Y9)
1.3.6 Governance
- ✅ The specification is public: the language reference states the language, and the enhancement proposals record the changes (Y12)
- ✅ A published parser exists: the runtime ships
ast, and its grammar source is public (Y19)
1.4 Profile
Unscored, and kept separate from every score on purpose. The profile records what a mechanism price cannot express: what a running program costs, how well a coding model and an agent work in the language, and whether a safety-critical path exists.
1.4.1 Energy and cost
What this axis asks: what does a running program cost in energy and time?
1.4.2 AI and agent readiness
What this axis asks: how well does a coding model and an agent work in this language?
1.4.3 Safety certification
What this axis asks: is there a certified or standards-qualified path to a safety-critical system?
- ⚠️ No certified or standards-qualified path is published for the language itself; a safety-critical deployment rests on a platform vendor’s qualified runtime, not on the language.
1.5 Scoring detail
1.5.1 Core coupling Dimensions
| Dimension | Mechanism | Description | Imposed by | Present | Weight |
|---|---|---|---|---|---|
| Type | T1 |
dynamic no static check | language | ✅ | −15 |
T2 |
weak static | language | — | 0 | |
T3 |
dynamic/duck dispatch | language | ✅ | −8 | |
T4 |
no sum types | language | ✅ | −4 | |
T5 |
no generics | language | ✅ | −4 | |
T6 |
no namespaces | language | — | 0 | |
T7 |
type erasure/reflection | language | — | 0 | |
T8 |
operator overloading | language | — | 0 | |
T9 |
inheritance required for polymorphism | language | — | 0 | |
T10 |
no null-safety | language | ✅ | −8 | |
T11 |
no module boundary | language | — | 0 | |
T12 |
no effect tracking | language | ✅ | −8 | |
T13 |
async/sync colouring | language | — | 0 | |
T14 |
unchecked foreign boundary | language | ✅ | −4 | |
T15 |
chars are encoding units | language | — | 0 | |
| Type cost | −14.6 (−51) | ||||
| Construction | C1 |
global mutable state by default | language | ✅ | −15 |
C2 |
no immutability by default | language | ✅ | −4 | |
C3 |
constructors coupled to allocation | language | — | 0 | |
C4 |
no constructor/validation | language | — | 0 | |
C5 |
unpinned collection order | language | ✅ | −4 | |
C6 |
aliasing by default | language | ✅ | −8 | |
C7 |
undeclared control transfer | language | — | 0 | |
C8 |
no source-visible init order | language | ✅ | −8 | |
| Construction cost | −11.1 (−39) | ||||
| Memory | M1 |
manual deallocation | runtime | — | 0 |
M2 |
GC non-deterministic pauses | runtime | ✅ | −8 | |
M3 |
no RAII | language | ✅ | −4 | |
M4 |
no ownership model | language | ✅ | −8 | |
M5 |
uninitialized reads | language | — | 0 | |
M6 |
unchecked reinterpretation | language | — | 0 | |
Er6 |
uncatchable runtime fault | language | — | 0 | |
M7 |
reference cycles leak | runtime | — | 0 | |
| Memory cost | −5.7 (−20) | ||||
| Error | Er1 |
no structured path | language | — | 0 |
Er2 |
unchecked exceptions only | language | ✅ | −8 | |
Er3 |
errors ignored/non-exhaustive | language | — | 0 | |
Er4 |
no composable result type | language | ✅ | −4 | |
Er5 |
no isolation unit for a fault | runtime | — | 0 | |
| Error cost | −3.4 (−12) | ||||
| Concurrency | K1 |
GIL/no parallel | runtime | ✅ | −15 |
K2 |
shared mutable state default | language | ✅ | −8 | |
K3 |
manual sync no race detection | runtime | ✅ | −8 | |
K4 |
no structured concurrency | language | ✅ | −4 | |
K5 |
no primitives | language | — | 0 | |
K6 |
thread-per-task cost | runtime | — | 0 | |
| Concurrency cost | −10.0 (−35) | ||||
| Platform | P1 |
cannot function outside one vendor/domain | context | — | 0 |
P2 |
single-vendor but other uses | context | — | 0 | |
P3 |
legacy/discontinued platform | context | — | 0 | |
P4 |
poor domain fit | context | — | 0 | |
| Platform cost | 0 |
Core coupling score: 55.1/100 — 157 of the 350 inventory points are present, so the axis cost is 100 × 157 ÷ 350 = 44.9 and the score is 100 − 44.9. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.
1.5.2 Ecosystem coupling Dimensions
| Dimension | Mechanism | Description | Imposed by | Present | Weight |
|---|---|---|---|---|---|
| Performance | R1 |
interpreted no AOT/JIT | runtime | ✅ | −8 |
R2 |
GC pauses | runtime | — | 0 | |
R3 |
JIT warmup | runtime | — | 0 | |
| Performance cost | −3.1 (−8) | ||||
| Ecosystem | Ec1 |
no package manager | context | — | 0 |
Ec2 |
fragmented tooling | context | — | 0 | |
Ec3 |
small/niche/discontinued | context | — | 0 | |
Ec4 |
proprietary | context | — | 0 | |
Ec5 |
platform-locked tooling | context | — | 0 | |
Ec6 |
monoculture | context | — | 0 | |
Ec7 |
legacy burden | context | — | 0 | |
Ec8 |
unpromised binary boundary | context | ✅ | −8 | |
Ec9 |
unpromised data boundary | context | ✅ | −8 | |
| Ecosystem cost | −6.2 (−16) | ||||
| Evolution | V1 |
breaking changes | language | ✅ | −8 |
V2 |
frozen | context | — | 0 | |
V3 |
discontinued | context | ✅ | −15 | |
V4 |
glacial standards | context | — | 0 | |
V5 |
silent default drift | runtime | — | 0 | |
V7 |
build-variant state space | context | — | 0 | |
| Evolution cost | −9.0 (−23) | ||||
| Domain | D1 |
domain/vendor lock-in | context | — | 0 |
D3 |
framework forces architecture | context | — | 0 | |
| Domain cost | 0 | ||||
| Learning | L1 |
steep | context | — | 0 |
L2 |
large surface/multi-paradigm | context | — | 0 | |
L3 |
sparse docs | context | — | 0 | |
| Learning cost | 0 | ||||
| Syntax | S1 |
verbose | language | — | 0 |
S2 |
inconsistent | language | — | 0 | |
S3 |
punctuation-heavy | language | — | 0 | |
| Syntax cost | 0 | ||||
| Testing | G1 |
weak tooling | context | — | 0 |
G2 |
poor debugging | context | — | 0 | |
G3 |
runtime-only errors | context | ✅ | −4 | |
G4 |
no published monotonic clock | runtime | ✅ | −4 | |
| Testing cost | −3.1 (−8) | ||||
| Security | Q1 |
memory-unsafe | language | — | 0 |
Q2 |
dynamic/weak typing risk | language | ✅ | −8 | |
Q3 |
known vulnerability/injection | context | ✅ | −8 | |
Q4 |
silent integer overflow | language | — | 0 | |
| Security cost | −6.2 (−16) |
Ecosystem coupling score: 72.3/100 — 71 of the 256 inventory points are present, so the axis cost is 100 × 71 ÷ 256 = 27.7 and the score is 100 − 27.7. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.
1.5.3 Engineering readiness Dimensions
| Dimension | Mechanism | Description | Imposed by | Present | Weight |
|---|---|---|---|---|---|
| Reproducibility | Y1 |
build not reproducible | context | ✅ | −15 |
Y2 |
dependencies not pinned | context | ✅ | −8 | |
Y14 |
no toolchain version pin | context | ✅ | −8 | |
Y18 |
no machine-read project contract | context | — | 0 | |
| Reproducibility cost | −18.1 (−31) | ||||
| Supply chain | Y3 |
no signed provenance | context | — | 0 |
Y4 |
registry without namespacing | context | ✅ | −4 | |
Y16 |
no advisory feed | context | — | 0 | |
| Supply chain cost | −2.3 (−4) | ||||
| Observability | Y5 |
no stable tracing standard | context | — | 0 |
Y6 |
no structured logging | context | — | 0 | |
Y15 |
no post-mortem diagnostics | runtime | — | 0 | |
| Observability cost | 0 | ||||
| Feedback | Y7 |
slow build | context | — | 0 |
Y8 |
no fast in-editor analysis | context | — | 0 | |
Y13 |
no bundled debugger | context | — | 0 | |
| Feedback cost | 0 | ||||
| Interop | Y9 |
no foreign-function interface | language | — | 0 |
Y10 |
no portable target | context | — | 0 | |
| Interop cost | 0 | ||||
| Governance | Y11 |
single-vendor governance | context | — | 0 |
Y12 |
closed specification | context | — | 0 | |
Y17 |
no conformance mechanism | context | — | 0 | |
Y19 |
no published parser | context | — | 0 | |
| Governance cost | 0 |
Engineering readiness score: 79.5/100 — 35 of the 171 inventory points are present, so the axis cost is 100 × 35 ÷ 171 = 20.5 and the score is 100 − 20.5. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.
Verdict: Python 2.7 is the last release of the Python 2 line and the clearest example of a language that outgrew its own dialect. It is dynamic, garbage-collected, module-scoped, and readable, and it carries no type system, no effect tracking, and no sum type. Its costs are the costs of its era: print is a statement, str is bytes, a dictionary has no promised order, the only clock is the wall, and no scope runs a release. The interpreter lock forbids parallel bytecode, and the line itself ended in 2020, so a defect in 2.7 is permanent. Main strength: the era’s most productive language for data work and glue code. Main weakness: the 2.x line is a dead end by construction, and the move to 3.0 revisits every file. The family’s Python 3.14 page assesses the successor.
The formal development. The definitions, theorems, and proofs behind this page are published in:
- On the Nature of Coupling: All Coupling as Shared Resource Access — Zenodo, 2026 — doi:10.5281/zenodo.21925122
- Coupling as a Consequence of Cohesion: Decomposition, the Coupling Floor, and Domain-Imposed Coupling — Zenodo, 2026 — doi:10.5281/zenodo.21925201
- On the Nature of Cohesion: Cohesion as Correctness Relative to a Partitioning Rule — Zenodo, 2026 — doi:10.5281/zenodo.21703193