[Python-Dev] [Python-checkins] cpython: quote the type name for improved readability

"Martin v. Löwis" martin at v.loewis.de
Wed Nov 9 22:10:54 CET 2011

>> I recommend reverting the change. I fail to see why quoting the name
>> improves readability.
> It does if the name is "Throatwobbler Mangrove".

But that can't be - the type name ought to be an identifier, so it can't
have spaces. It might be possible to create deliberately confusing error
messages, though, such as

py> class your:pass
py> next(your())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: your object is not an iterator


More information about the Python-Dev mailing list