[issue29254] Documentation Error

New submission from Suraj Kumar: Hi, I have found one documentation mistake in section 3.1.2. Strings saying """Note how the start is always included, and the end always excluded. This makes sure that s[:i] + s[i:] is always equal to s:
word = 'Python' word[:2] + word[2:] 'Python' """
I think instead of 'the end always excluded' it should be 'the end always included'. If my observation is correct, please do the needful change. Thanks & Regards, Suraj ---------- assignee: docs@python components: Documentation messages: 285331 nosy: Suraj Kumar, docs@python priority: normal severity: normal status: open title: Documentation Error type: behavior versions: Python 3.6 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29254> _______________________________________

Ammar Askar added the comment: Given `slice[start:end]`: What this line is trying to say is that the slice index is inclusive for the start parameter and exclusive for the end parameter. In mathematical/interval notation this would look like [start, end) As a quick example look at the word "Python" Index 012345 Letter Python If you do word[:2], the result is 'Py', notice how the t is excluded. ---------- nosy: +ammar2 resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29254> _______________________________________

kev levrone <kevlevrone6@gmail.com> added the comment: The nevents argument determines the size of eventlist. When nevents is zero, kevent() will return immediately even if there is a timeout specified unlike select(2). https://goo.gl/KyvnZF ---------- nosy: +kevlevrone _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue29254> _______________________________________

Change by SilentGhost <ghost.adh@runbox.com>: ---------- Removed message: https://bugs.python.org/msg342070 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue29254> _______________________________________
participants (4)
-
Ammar Askar
-
kev levrone
-
SilentGhost
-
Suraj Kumar