]> granicus.if.org Git - python/commitdiff
Changed the extended slice example to show that you can reverse a
authorGuido van Rossum <guido@python.org>
Thu, 13 Jun 2002 11:41:07 +0000 (11:41 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 13 Jun 2002 11:41:07 +0000 (11:41 +0000)
string with a [::-1] slice.

Misc/NEWS

index aef5a24b2fa34932110d83b1ea21eceed0bf87de..767c3a578fb242a64aa26f2a0e31a5cddc84b888 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,8 +10,8 @@ Core and builtins
   finally clause.  [SF bug 567538]
 
 - Most builtin sequences now support "extended slices", i.e. slices
-  with a third "stride" parameter.  For example, "range(10)[1:6:2]"
-  evaluates to [1, 3, 5].
+  with a third "stride" parameter.  For example, "hello world"[::-1]
+  gives "dlrow olleh".
 
 - Cycles going through the __class__ link of a new-style instance are
   now detected by the garbage collector.