A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2015-February/138371.html below:

[Python-Dev] TypeError messages

[Python-Dev] TypeError messagesSerhiy Storchaka storchaka at gmail.com
Thu Feb 19 23:50:43 CET 2015
Different patterns for TypeError messages are used in the stdlib:

     expected X, Y found
     expected X, found Y
     expected X, but Y found
     expected X instance, Y found
     X expected, not Y
     expect X, not Y
     need X, Y found
     X is required, not Y
     Z must be X, not Y
     Z should be X, not Y

and more.

What the pattern is most preferable?

Some messages use the article before X or Y. Should the article be used 
or omitted?

Some messages (only in C) truncate actual type name (%.50s, %.80s, 
%.200s, %.500s). Should type name be truncated at all and for how limit? 
Type names newer truncated in TypeError messages raised in Python code.

Some messages enclose actual type name with single quotes ('%s', 
'%.200s'). Should type name be quoted? It is uncommon if type name 
contains spaces.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4