On Friday 26 August 2005 09:15, Michael Chermside wrote: > Oh my GOD! Are you saying that in order to correctly read Python code > that a programmer must know all of THAT! I would be entirely > unsurprised to learn that NO ONE on this list... in fact, no one > in the whole world could have reproduced that specification from > memory accurately. I have never seen a more convincing argument for > why we should allow only limited forms in Python 3.0.
No kidding. The stuff about the tuples is particularly painful, but is specifically there to deal with string exceptions and the idiom that an exception could be defined as a tuple of exceptions. In fact, anydbm is particularly eggregious: it defines an error class derived from Exception, and then adds that to a tuple with the string exceptions from the specific modules it fronts for. The tuple handling in raise allows anydbm.error to be raised and then caught again abstractly, in addition to allow anydbm.error to act as a "base" exception that catches the specific errors raised by the backend databases. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com