diff options
author | Guido van Rossum <guido@python.org> | 2002-06-13 11:41:07 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-06-13 11:41:07 (GMT) |
commit | 2e82e717e666c13aebc063825cebc10af1c684f0 (patch) | |
tree | 9e5275f75128b63b87c09e7e40509e3e5da1ddb7 | |
parent | e9996c60934c12861ab2e4765291398eaaa4b5bf (diff) | |
download | cpython-2e82e717e666c13aebc063825cebc10af1c684f0.zip cpython-2e82e717e666c13aebc063825cebc10af1c684f0.tar.gz cpython-2e82e717e666c13aebc063825cebc10af1c684f0.tar.bz2 |
Changed the extended slice example to show that you can reverse a
string with a [::-1] slice.
-rw-r--r-- | Misc/NEWS | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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. |