Tutorial creates confusion about slices

Michael Bentley michael at jedimindworks.com
Tue Apr 24 14:14:29 CEST 2007


On Apr 24, 2007, at 6:35 AM, Antoon Pardon wrote:

> On 2007-04-24, Michael Bentley <michael at jedimindworks.com> wrote:
>>
>> On Apr 24, 2007, at 4:47 AM, Antoon Pardon wrote:
>>
>>> 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.
>>
>> It's only potentially confusing if you already know more than has
>> been presented and are in fact, *experimenting* with techniques that
>> have yet to be presented.
>
> People don't read tutorials in a strictly linear fashion. They can
> continue to later subjects and then come back here to see how things
> tie together. So the fact that it is only confusing to those who
> know more than is already presented doesn't seem a very good reason
> to leave it in.

Yet they understand that earlier in the document, there is likely to  
be a less complete coverage of a given topic.  There is in fact, a  
link on that page that includes a more complete coverage of that  
topic (which I mentioned to you in an earlier message IIRC).

>
>>>> 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?
>>
>> ... or even continue the thread?
>
> It is always interresting to see how far people are willing to go to
> defend the status quo.
>
> I bet that if the tutorial was written now, given the possible
> confusion, nobody would defend including this section. But now
> that it already is in the tutorial it suddenly is worth defending.

Submit a patch if you want it changed.  I'm sure your valuable  
insights will greatly improve the quality of the python documentation.






More information about the Python-list mailing list