Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Commit

Permalink
Merge pull request #5 from GaoFangshu/master
Browse files Browse the repository at this point in the history
Modified `parse_table` function.
  • Loading branch information
longht committed Jul 27, 2017
2 parents a9bd231 + 8639cf9 commit 68d68de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion torchcraft_py/utils.py
@@ -1,3 +1,5 @@
import re

def print_err(msg):
raise RuntimeError(msg)

Expand Down Expand Up @@ -50,7 +52,7 @@ def parse_table(s):
return result

s = s[1:-1]
kvs = s.split(',')
kvs = re.split(r',(?=[a-zA-Z])',s)
for kv in kvs:
if len(kv) == 0:
continue
Expand Down

0 comments on commit 68d68de

Please sign in to comment.