summaryrefslogtreecommitdiff
path: root/src/pyparsing.py
diff options
context:
space:
mode:
authorptmcg <ptmcg@9bf210a0-9d2d-494c-87cf-cfb32e7dff7b>2016-08-05 17:57:13 +0000
committerptmcg <ptmcg@9bf210a0-9d2d-494c-87cf-cfb32e7dff7b>2016-08-05 17:57:13 +0000
commitc4ebbf1551e743122815aa0af3a45b3ecb5528d1 (patch)
treea8b086a51bfb397fc175501e3eabb036b2eccf46 /src/pyparsing.py
parent0f8a9c8bfaa4fd8b05a0d54b119ffeaab59ef44a (diff)
downloadpyparsing-c4ebbf1551e743122815aa0af3a45b3ecb5528d1.tar.gz
Rename pyparsing_common's "numeric" and "number" expressions to "number" and "fnumber", to better indicate which expression forces conversion to float (that is fnumber)
git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@384 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
Diffstat (limited to 'src/pyparsing.py')
-rw-r--r--src/pyparsing.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pyparsing.py b/src/pyparsing.py
index 43216a5..a6e4f3b 100644
--- a/src/pyparsing.py
+++ b/src/pyparsing.py
@@ -58,7 +58,7 @@ The pyparsing module handles some of the problems that are typically vexing when
"""
__version__ = "2.1.6"
-__versionTime__ = "03 Aug 2016 23:56 UTC"
+__versionTime__ = "05 Aug 2016 17:50 UTC"
__author__ = "Paul McGuire <ptmcg@users.sourceforge.net>"
import string
@@ -4104,10 +4104,10 @@ class pyparsing_common:
"""expression that parses a floating point number with optional scientific notation and returns a float"""
# streamlining this expression makes the docs nicer-looking
- numeric = (sciReal | real | signedInteger).streamline()
+ number = (sciReal | real | signedInteger).streamline()
"""any numeric expression, returns the corresponding Python type"""
- number = Regex(r'[+-]?\d+\.?\d*([eE][+-]?\d+)?').setName("number").setParseAction(convertToFloat)
+ fnumber = Regex(r'[+-]?\d+\.?\d*([eE][+-]?\d+)?').setName("fnumber").setParseAction(convertToFloat)
"""any int or real number, returned as float"""
identifier = Word(alphas+'_', alphanums+'_').setName("identifier")
@@ -4203,7 +4203,7 @@ if __name__ == "__main__":
""")
- pyparsing_common.numeric.runTests("""
+ pyparsing_common.number.runTests("""
100
-100
+100
@@ -4213,7 +4213,7 @@ if __name__ == "__main__":
""")
# any int or real number, returned as float
- pyparsing_common.number.runTests("""
+ pyparsing_common.fnumber.runTests("""
100
-100
+100