Skip to content

Commit b51fb1b

Browse files
committed
unicode format compatible with 2 and 3
1 parent 3f66590 commit b51fb1b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

beta_code/beta_code.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,6 @@ def beta_code_to_greek(beta_code):
4545
return sigma_to_end_of_word_sigma(u''.join(greek_characters))
4646

4747
def sigma_to_end_of_word_sigma(string):
48-
return re.sub(ur'σ(?=[,.:;·\s]|$)', u'ς', string)
48+
regex = re.compile(u'σ(?=[,.:;·\s]|$)')
49+
50+
return re.sub(regex, u'ς', string)

0 commit comments

Comments
 (0)