On Sun, Oct 9, 2016 at 5:45 AM, Random832 <random...@fastmail.com> wrote: > On Sat, Oct 8, 2016, at 07:29, Steve D'Aprano wrote: >> The oldest version I have access to is the *extremely* primitive 0.9. Not >> surprisingly, it doesn't have xrange -- but it lacks a lot of things, >> including globals(), map(), named exceptions, "" strings ('' is okay), >> exponentiation, and more. > > Really? I'm not sure exactly what you mean by "named exceptions", but > 0.9.1 has RuntimeError, EOFError, TypeError, MemoryError, NameError, > SystemError, and KeyboardInterrupt... but exceptions aren't objects, > they're strings. > > They're caught by identity, though - "except 'type error'" fails to > catch TypeError, and vice versa.
Fascinating! What about: except sys.intern('type error') ? Or does interning of strings not exist yet :) ChrisA -- https://mail.python.org/mailman/listinfo/python-list