From 545591a696bdff73f68573c54a05ca70eb58032d Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 21 Jan 2014 00:27:33 +0200 Subject: Implement string multiplication. --- tests/basics/string1.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/basics/string1.py') diff --git a/tests/basics/string1.py b/tests/basics/string1.py index 3fecf799b..40e766b59 100644 --- a/tests/basics/string1.py +++ b/tests/basics/string1.py @@ -8,6 +8,8 @@ print(x) print('123' + "456") +print('123' * 5) + # iter print(list('str')) -- cgit v1.2.3 From 7380a837802b4630bdcef6e01cd5be32f92750ca Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 21 Jan 2014 02:22:02 +0200 Subject: str: Implement proper string (instead of byte string) indexing. Also, support negative indexes. --- tests/basics/string1.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/basics/string1.py') diff --git a/tests/basics/string1.py b/tests/basics/string1.py index 40e766b59..074b04ef8 100644 --- a/tests/basics/string1.py +++ b/tests/basics/string1.py @@ -10,6 +10,17 @@ print('123' + "456") print('123' * 5) +print('abc'[1]) +print('abc'[-1]) +try: + 'abc'[100] +except IndexError: + print('caught') +try: + 'abc'[-4] +except IndexError: + print('caught2') + # iter print(list('str')) -- cgit v1.2.3