[Tutor] What's the logic behind parameters and arguments?
Alan Gauld
alan.gauld at btinternet.com
Tue Mar 29 11:35:19 CEST 2011
"Rafael Durán Castañeda" <rafadurancastaneda at gmail.com> wrote
>I don't see discrepancy, end and count are two arguments than mean
>very
> different things. End is the position where find ends, it could be
> included
> or excluded, in this case is excluded. Count is the maximun number
> of
> substrings you want to replace, it wouldn't make sense count=6 if
> you want
> to replace 5.
And in general Python uses the convention for *positional* values
that it goes up to but not including the last position.
Compare slicing, range() etc.
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list