From ba88e64fedc541e9e3766e258a6cfa051acf56d9 Mon Sep 17 00:00:00 2001 From: Vivien Maisonneuve Date: Tue, 19 Aug 2014 11:49:10 +0200 Subject: [PATCH] Allow leading underscores in symbols in LinExpr.fromstring() --- linpy/linexprs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linpy/linexprs.py b/linpy/linexprs.py index b5864e1..b97f048 100644 --- a/linpy/linexprs.py +++ b/linpy/linexprs.py @@ -331,7 +331,7 @@ class LinExpr: 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): -- 2.20.1