Re: [Tutor] 'slice', etc

2013-12-06 Thread eryksun
On Fri, Dec 6, 2013 at 10:39 AM, spir wrote: > > How does slicing in Python really work? Apparently, there are slice objects > (start, past-end, step), generated using either the 'slice' builtin func or > the extended slicing syntax [i:k:s]. Is this correct? [1] Have you read the docs for the dat

Re: [Tutor] 'slice', etc

2013-12-06 Thread Mark Lawrence
[Once again I didn't actually write what Joel is replying to :( ] On 07/12/2013 01:49, Joel Goldstick wrote: On Fri, Dec 6, 2013 at 8:45 PM, Mark Lawrence http://docs.python.org/3.3/__library/functions.html#slice : slic

Re: [Tutor] 'slice', etc

2013-12-06 Thread Joel Goldstick
On Fri, Dec 6, 2013 at 8:45 PM, Mark Lawrence wrote: > On 07/12/2013 01:26, spir wrote: > >> On 12/07/2013 02:07 AM, Alan Gauld wrote: >> >>> On 06/12/13 15:39, spir wrote: >>> >>> How does slicing in Python really work? Apparently, there are slice objects (start, past-end, step), generated

Re: [Tutor] 'slice', etc

2013-12-06 Thread Mark Lawrence
On 07/12/2013 01:26, spir wrote: On 12/07/2013 02:07 AM, Alan Gauld wrote: On 06/12/13 15:39, spir wrote: How does slicing in Python really work? Apparently, there are slice objects (start, past-end, step), generated using either the 'slice' builtin func or the extended slicing syntax [i:k:s].

Re: [Tutor] 'slice', etc

2013-12-06 Thread spir
On 12/07/2013 02:07 AM, Alan Gauld wrote: On 06/12/13 15:39, spir wrote: How does slicing in Python really work? Apparently, there are slice objects (start, past-end, step), generated using either the 'slice' builtin func or the extended slicing syntax [i:k:s]. Is this correct? [1] I believe

Re: [Tutor] 'slice', etc

2013-12-06 Thread Alan Gauld
On 06/12/13 15:39, spir wrote: How does slicing in Python really work? Apparently, there are slice objects (start, past-end, step), generated using either the 'slice' builtin func or the extended slicing syntax [i:k:s]. Is this correct? [1] I believe the slice notation simply calls the underly

Re: [Tutor] 'slice', etc

2013-12-06 Thread Danny Yoo
> > > PS: I searched but could not find a PEP specifically dedicated to 'slice' > only. Pointers welcome, especially to docs explaining purpose, rationale, > design, etc... Maybe this means slices have always existed and I just > missed them totally? > > I believe that slices have always been a par

Re: [Tutor] 'slice', etc

2013-12-06 Thread Mark Lawrence
On 06/12/2013 15:39, spir wrote: Are slices and subsequences transparently usable one for the other? I suggest that you try this for yourself at the interactive prompt, as this is the best way to learn. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can d

[Tutor] 'slice', etc

2013-12-06 Thread spir
Hello, How does slicing in Python really work? Apparently, there are slice objects (start, past-end, step), generated using either the 'slice' builtin func or the extended slicing syntax [i:k:s]. Is this correct? [1] Does (only) the extended syntax (always) trigger slicing instead of contruct