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/138400.html below:

[Python-Dev] TypeError messages

[Python-Dev] TypeError messagesR. David Murray rdmurray at bitdance.com
Sat Feb 21 16:57:49 CET 2015
On Sun, 22 Feb 2015 00:26:23 +1000, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On 21 February 2015 at 00:05, Brett Cannon <brett at python.org> wrote:
> >  I agree that type names don't need to be quoted.
> 
> As a user, I actually appreciate the quotes, because they make the
> error pattern easier for me to parse. Compare:
> 
>     int expected, but found str
>     float expected, but found int
> 
>     'int' expected, but found 'str'
>     'float' expected, but found 'int'

It's not a big deal to me either way, but I find the version with the
quotes makes me think it is looking for the literal string 'int', but
found the literal string 'str', whereas in the first case it seems
clear it is looking for objects of that type.  Perhaps this is just
because I am used to the existing messages, but I think it goes
beyond that.

--David
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