Skip to content

Commit e726f20

Browse files
author
Frederic Peschanski
committed
missing pieces
1 parent c3a6cdf commit e726f20

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

mrpython/StudentRunner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def install_locals(locals):
4141
locals['Iterable'] = typing.Iterable
4242
locals['Tuple'] = typing.Tuple
4343
locals['Dict'] = typing.Dict
44+
locals['Optional'] = typing.Optional
4445

4546
# hack
4647
locals['Image'] = None

mrpython/typechecking/typechecker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ def type_infer_EMult(expr, ctx):
11671167

11681168
# first case if the left operand is a string
11691169

1170-
if isinstance(left_type, StrType):
1170+
if isinstance(left_type, (StrType, ListType, SequenceType)):
11711171
right_type = type_expect(ctx, expr.right, IntType())
11721172
if not right_type:
11731173
return None

0 commit comments

Comments
 (0)