1.3

Latest release in branch 1.3
Released 30 years ago (October 12, 1995)

Software Python
Branch 1.3
Status
End of life
First official release version 1.3
First official release date 30 years ago (October 12, 1995)
Source code https://github.com/python/cpython/tree/v1.3
Documentation https://docs.python.org/release/1.3/
Download http://legacy.python.org/download/releases/binaries-1.3/
Python 1.3 Releases View full list

What Is New in Python 1.3

Python 1.3 was released in 1995, during Python's early growth phase at CNRI. This version is largely an incremental refinement over 1.2, adding new modules to the standard library and cleaning up inconsistencies. The focus was on making Python a more complete and practical language for scripting, system administration, and early web development.

Category Change Notes
Standard Library getopt module for command-line argument parsing POSIX-style option parsing
Standard Library fnmatch module for Unix filename pattern matching Glob patterns like *.py
Standard Library readline integration for interactive line editing Tab completion in the REPL
Standard Library Improved shelve for persistent dictionary storage Key-value persistence backed by dbm
Standard Library Thread support improvements (thread module) Early multi-threading (no GIL abstractions yet)
Language Refinements to class and inheritance behavior Pre-unification class model improvements

Standard Library Additions in Python 1.3

getopt -- POSIX Option Parsing

The getopt module provided Unix-style command-line parsing, allowing scripts to accept short options (-v, -f filename) and long options (--verbose, --file=filename). This made Python suitable for writing replacements for shell scripts.

import getopt, sys

opts, args = getopt.getopt(sys.argv[1:], "hvf:", ["help", "verbose", "file="])
for opt, val in opts:
    if opt in ("-h", "--help"):
        print("Usage...")
    elif opt in ("-f", "--file"):
        filename = val

getopt was eventually superseded by optparse (Python 2.3) and then argparse (Python 3.2), but it remains in the stdlib for compatibility.

shelve -- Persistent Object Storage

The shelve module provides a persistent, dictionary-like object backed by a dbm database. Objects are stored as pickled values, keyed by strings. This was one of the first "batteries included" persistence mechanisms in Python.

import shelve

with shelve.open("mydata") as db:
    db["users"] = ["Alice", "Bob", "Carol"]
    db["config"] = {"host": "localhost", "port": 8080}

# Later:
with shelve.open("mydata") as db:
    print(db["users"])  # ["Alice", "Bob", "Carol"]

FAQ

Is shelve suitable for production use?
For small-scale, single-process persistence -- yes. For anything requiring concurrent access, multi-process writes, or transactional safety, use a database (SQLite at minimum). shelve has no locking and its underlying dbm format varies by platform, making it non-portable in some configurations.

Is getopt still worth knowing?
For reading legacy code, yes. For new code, use argparse. getopt is minimalist and does not generate help text automatically. argparse handles subcommands, type coercion, mutually exclusive options, and auto-generated usage text -- all absent from getopt.

When was the GIL (Global Interpreter Lock) introduced?
The GIL has been present since Python's earliest versions -- it was part of the original CPython design to simplify memory management and avoid race conditions in the reference counter. Python 1.3's thread support worked within the GIL. The fundamental constraint of the GIL on CPU-bound multi-threading applies to all CPython versions and is only being experimentally addressed with the "no-GIL" (PEP 703) work in Python 3.13+.

What was Python used for in 1995?
System administration scripting (replacing Perl and shell scripts), scientific computing (precursors to NumPy and SciPy were in development), early CGI web scripting, and glue code between components. Python was already valued for its readability and the "batteries included" philosophy that Guido championed.

Did Python 1.3 have comprehensions or generators?
No. List comprehensions arrived in Python 2.0. Generator functions with yield arrived in Python 2.2. In Python 1.3, building lists required explicit for loops with append, and lazy iteration required a class implementing __iter__ and __next__ manually.

Releases In Branch 1.3

Version Release date
1.3 30 years ago
(October 12, 1995)
1.3b1 30 years ago
(August 28, 1995)