Rick Harris <[EMAIL PROTECTED]> added the comment: I think it is important to round-trip for at least two reasons:
1) Consistency. Other built-in exceptions behave this way, why should KeyError be any different? Okay, technically 3 UnicodeErrors don't allow just strings to be passed in (perhaps they should :-); but for common exception classes, they all behave the same way. To quote PEP-20: "Special cases aren't special enough to break the rules" 2) Intuitiveness. Decorating the string with quotes is unexpected; it has already caused at least one bug and could cause more. Ensuring intuitive round-trip behavior is an important enough issue that is explicitly discussed in PEP 327 for the decimal type. Why can't intuitiveness be restored to KeyError in Py3K? __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2651> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com