Discussion:
[Erp5-dev] ERP5 developer-Python.Tutorial: slicing: wrong upper index explanation (bug in docs)
Michael V. Antosha
2011-08-19 09:52:49 UTC
Permalink
Hello,

Reporting a bug in documentation.
Python Tutorial, slide 8 "Lists" (see [1]).

This is from the example in the tutorial (pay attention to the last
li
['baby', 'mom', 'dad']
li[1]
'mom'
li[0:1]
['baby', 'mom']
li
['baby', 'mom', 'dad']
li[1]
'mom'
li[0:1]
['baby']

I also suggest an improvement (inside brackets) to the comments:
"Slicing a list consists of accessing it by giving out two indices. The
first index will be the starting point and it will take all the elements
up to (but not including) the second index."


[1] Python Tutorial, slide 8 "Lists"
http://www.erp5.com/documentation/developer/developer-Python.Tutorial/img7.html
--
Michael V. Antosha
http://identi.ca/mivael
xmpp:mivael at jabber.org

Using Gmail? Please read this important notice:
http://www.fsf.org/campaigns/jstrap/gmail?6278
Loading...