[Python-Dev] list.extend

Tim Peters tim.one@comcast.net
Fri, 28 Jun 2002 01:48:11 -0400

>> If you want to change it, be sure to hunt down all the related ones
>> too; e.g.,

> I wouldn't know where to start with that project. Do you think it would be
> a bad idea to make one of many error messages more accurate?

Increasing accuracy isn't necessarily helpful.  In any context where
PyInt_AsLong is called, an int most certainly is required *in the end*.
Spelling out that the implementation may satisfy this requirement by asking
a non-int type whether it knows how to convert instances of itself to an int
doesn't seem helpful to me as a user.  I'm not thinking that much about the
internal implementation, and "of course" if an int is required Python will
accept an object of a type that knows how to convert itself to an int.  But
I suppose you don't like seeing

    SyntaxError: invalid syntax

at the end of a 7-line statement either <wink>.