Convert parsed path args to correct types
This commit is contained in:
parent
9116ad8ac2
commit
9579e4b4d0
1 changed files with 10 additions and 1 deletions
|
@ -42,7 +42,16 @@ class PathCommand():
|
|||
if len(self.arg) > 0:
|
||||
self.args.append(self.arg)
|
||||
|
||||
ret = [self.command, self.args]
|
||||
args = list()
|
||||
|
||||
for arg in self.args:
|
||||
try:
|
||||
arg.index('.')
|
||||
args.append(float(arg))
|
||||
except ValueError:
|
||||
args.append(int(arg))
|
||||
|
||||
ret = [self.command, args]
|
||||
|
||||
self.command = None
|
||||
self.args = list()
|
||||
|
|
Loading…
Add table
Reference in a new issue