Annoying octal notation

Neil Hodgson nyamatongwe+thunder at
Sat Aug 29 01:02:33 CEST 2009

Steven D'Aprano:

> Obviously I can't speak for Ken Thompson's motivation in creating this 
> feature, but I'm pretty sure it wasn't to save typing or space on 
> punchcards.

   The original implementation of UNIX was on a PDP-7 which was an
18-bit machine. Octal = 3 bits at a a time which evenly divides an
18-bit word whereas the 4 bits of hexadecimal do not. Early
implementations of B were (according to Wikipedia) on the PDP-7, PDP-11
(a 16-bit machine) and Honeywell 36-bit mainframes.

   Octal was widely used on the PDP-11. DEC's PDP-11 Assembler defaulted
to octal and didn't even support hexadecimal. The prefixes used in
MACRO-11 for explicit radixes were ^D, ^O, and ^B.


More information about the Python-list mailing list