[Tutor] updating a dictionary

Emile van Sebille emile at fenx.com
Fri Feb 20 00:26:40 CET 2015


On 2/19/2015 3:10 PM, Alan Gauld wrote:
> On 19/02/15 22:50, Emile van Sebille wrote:
>
>>>      if cell.endswith(suffix, 14, 16) is False:
>>
>> ... so they'll never end with numeric values.  Further, "".endswith()
>> accepts only one argument so you ought to get an error on this line.
>
> Sorry Emile, The OP is correct.
>
> ######################
>  >>> help(''.endswith)
> endswith(...) method of builtins.str instance
>      S.endswith(suffix[, start[, end]]) -> bool

You're right of course.  That should teach me to read closer:

TypeError: endswith() takes at least 1 argument (0 given)

I skipped the 'at least' part of that.

the-deeper-the-corners-the-thicker-the-cobwebs-ly y'rs,

Emile





More information about the Tutor mailing list