projects
/
linpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow leading underscores in symbols in LinExpr.fromstring()
[linpy.git]
/
linpy
/
linexprs.py
diff --git
a/linpy/linexprs.py
b/linpy/linexprs.py
index
b5864e1
..
b97f048
100644
(file)
--- a/
linpy/linexprs.py
+++ b/
linpy/linexprs.py
@@
-331,7
+331,7
@@
class LinExpr:
return left / right
raise SyntaxError('invalid syntax')
return left / right
raise SyntaxError('invalid syntax')
- _RE_NUM_VAR = re.compile(r'(\d+|\))\s*([^\W\d
_
]\w*|\()')
+ _RE_NUM_VAR = re.compile(r'(\d+|\))\s*([^\W\d]\w*|\()')
@classmethod
def fromstring(cls, string):
@classmethod
def fromstring(cls, string):