Silly question

Aahz aahz at pythoncraft.com
Thu Aug 20 19:51:00 EDT 2009


In article <mailman.143.1250793404.2854.python-list at python.org>,
Benjamin Kaplan  <benjamin.kaplan at case.edu> wrote:
>On Thu, Aug 20, 2009 at 2:13 PM, David C Ullrich<dullrich at sprynet.com> wrot=
>e:
>>
>> I just noticed that
>> sequence[i:j:k]
>
>Well, I got some good news and some bad news. According to the docs,
>it existed in 1.4 but the built-in sequences didn't support it until
>2.3. It's not used that often anyway so you haven't been missing much.

Except that it's canonical for one specific operation:

'reverseme'[::-1]
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Given that C++ has pointers and typecasts, it's really hard to have a
serious conversation about type safety with a C++ programmer and keep a
straight face.  It's kind of like having a guy who juggles chainsaws
wearing body armor arguing with a guy who juggles rubber chickens wearing
a T-shirt about who's in more danger."  --Roy Smith



More information about the Python-list mailing list