Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Theresa Pollinger
MoSIS
Commits
6df48f27
Commit
6df48f27
authored
Apr 06, 2018
by
Theresa Pollinger
Browse files
replaced short by long arrows
parent
24af33cb
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
interview_kernel/example_interview.ipynb
View file @
6df48f27
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
interview_kernel/mmtinterface.py
View file @
6df48f27
...
...
@@ -164,7 +164,7 @@ class MMTReply:
name
=
next
.
get
(
'name'
)
while
next
.
getnext
()
is
not
None
:
next
=
next
.
getnext
()
name
=
name
+
"
→
"
+
next
.
get
(
'name'
)
name
=
name
+
"
⟶
"
+
next
.
get
(
'name'
)
return
name
# (probably very volatile) accesses to concrete data structures
...
...
@@ -304,4 +304,6 @@ class MMTInterface:
def
add_dd
(
string
):
if
string
.
endswith
(
"❙"
)
or
string
.
endswith
(
"❚"
):
return
string
return
string
+
"❙"
interview_kernel/string_handling.py
View file @
6df48f27
...
...
@@ -5,6 +5,8 @@ import re
from
urllib.parse
import
urlparse
,
urlencode
,
ParseResult
object_delimiter
=
"❘"
declaration_delimiter
=
"❙"
module_delimiter
=
"❚"
def
means_no
(
answer
):
try
:
...
...
@@ -61,7 +63,7 @@ def insert_type(string, whichtype):
def
type_is_function_from
(
type_string
,
from_string
):
if
type_string
.
startswith
(
from_string
+
"
→
"
):
if
type_string
.
startswith
(
from_string
+
"
⟶
"
):
return
True
if
type_string
.
startswith
(
"{ : "
+
from_string
):
return
True
...
...
@@ -80,7 +82,7 @@ def type_is_function_from(type_string, from_string):
def
type_is_function_to
(
type_string
,
to_string
):
if
type_string
.
endswith
(
"
→
"
+
to_string
):
if
type_string
.
endswith
(
"
⟶
"
+
to_string
):
return
True
if
type_string
.
endswith
(
"} "
+
to_string
):
return
True
...
...
@@ -115,7 +117,7 @@ def get_first_word(string):
def
get_last_type
(
string
):
string
=
remove_round_brackets
(
string
)
string
=
string
.
rstrip
()
return
re
.
split
(
'[
→
\s]'
,
string
)[
-
1
]
return
re
.
split
(
'[
⟶
\s]'
,
string
)[
-
1
]
def
make_reverse_list_of_type_symbols
(
string
):
...
...
@@ -140,7 +142,7 @@ def remove_curly_brackets(string):
def
remove_arrows
(
string
):
return
string
.
replace
(
"
→
"
,
""
)
return
string
.
replace
(
"
⟶
"
,
""
)
def
remove_colons
(
string
):
...
...
Write
Preview
Supports
Markdown
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