Commit adf483a9 by Piotr Mitros

type converted to isinstance

parent 59dfb2cf
...@@ -10,3 +10,4 @@ db.newaskbot ...@@ -10,3 +10,4 @@ db.newaskbot
db.oldaskbot db.oldaskbot
flushdb.sh flushdb.sh
build build
\#*\#
\ No newline at end of file
import json import json
import math import math
import numbers
import numpy import numpy
import random import random
import scipy import scipy
...@@ -158,9 +159,7 @@ class formularesponse(object): ...@@ -158,9 +159,7 @@ class formularesponse(object):
''' '''
d=dict([(k, numpy.complex(d[k])) for k in d if type(k)==str and \ d=dict([(k, numpy.complex(d[k])) for k in d if type(k)==str and \
k.isalnum() and \ k.isalnum() and \
(type(d[k]) == float or \ isinstance(d[k], numbers.Number)])
type(d[k]) == int or \
type(d[k]) == complex) ])
return d return d
def get_answers(self): def get_answers(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment