Tutorial creates confusion about slices

Antoon Pardon apardon at forel.vub.ac.be
Tue Apr 24 05:47:09 EDT 2007


On 2007-04-24, Michael Bentley <michael at jedimindworks.com> wrote:
>
> On Apr 24, 2007, at 1:39 AM, Antoon Pardon wrote:
>
>> I suspect that if you give this explanation to someone and explain
>> that there is also a step parameter, chances are he will answer
>> correctly if you ask him, what he thinks the following will result
>> in:
>>
>>
>>   "This is an example line"[12:19:2]
>>
>>
>>
>> If you ask him what the following will result in:
>>
>>   "This is an example line"[19:12:-1]
>>
>> Chances are he will give the wrong answer.
>
> To be honest, bro -- I'd expect him to have enough intelligence to  
> experiment for a second and figure it out.  This isn't rocket science  
> -- you can plainly see what's happening -- so learn it and move on.   

I don't think that the possibility to experiment and see for oneself
is a good reason to keep a possible confusing explanation in a tutorial.

> Or better yet, quietly submit a patch...

Why should I? If the reactions would have been one of agreement that
this is confusing and that the explanation should be changed, I would
have considered submitting a patch.

But most people that reacted seem to defend the current text in some
way or another. So if most people seem to feel there is no need for
a change why should I then submit a patch?

-- 
Antoon Pardon



More information about the Python-list mailing list