Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
typon-concurrency
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Thompson
typon-concurrency
Commits
7a976c15
Commit
7a976c15
authored
Aug 17, 2023
by
Tom Niget
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix find_indices to support UTF-8 characters
parent
5574219b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
trans/tests/a_a_errtest.py
trans/tests/a_a_errtest.py
+2
-2
trans/transpiler/__init__.py
trans/transpiler/__init__.py
+1
-1
No files found.
trans/tests/a_a_errtest.py
View file @
7a976c15
import
sys
import
math
def
g
():
def
g
àé
():
return
1
,
2
,
3
if
__name__
==
"__main__"
:
if
True
:
a
,
b
,
c
=
g
()
\ No newline at end of file
a
,
b
=
g
àé
()
# abc
\ No newline at end of file
trans/transpiler/__init__.py
View file @
7a976c15
...
...
@@ -148,8 +148,8 @@ def find_indices(s, indices: list[int]) -> list[int]:
except
StopIteration
:
break
j
+=
len
(
s
[
i
].
encode
(
"utf-8"
))
i
+=
1
j
+=
1
assert
len
(
results
)
==
len
(
indices
),
(
results
,
indices
,
s
)
return
sorted
(
list
(
results
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment