projects
/
linpy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7fda4e3
)
Allow leading underscores in symbols in LinExpr.fromstring()
author
Vivien Maisonneuve
<v.maisonneuve@gmail.com>
Tue, 19 Aug 2014 09:49:10 +0000
(11:49 +0200)
committer
Vivien Maisonneuve
<v.maisonneuve@gmail.com>
Tue, 19 Aug 2014 12:35:41 +0000
(14:35 +0200)
linpy/linexprs.py
patch
|
blob
|
history
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):