Commit 66c39b69 by Piotr Mitros

type converted to isinstance

parent 448754ac
......@@ -10,3 +10,4 @@ db.newaskbot
db.oldaskbot
flushdb.sh
build
\#*\#
\ No newline at end of file
import json
import math
import numbers
import numpy
import random
import scipy
......@@ -158,9 +159,7 @@ class formularesponse(object):
'''
d=dict([(k, numpy.complex(d[k])) for k in d if type(k)==str and \
k.isalnum() and \
(type(d[k]) == float or \
type(d[k]) == int or \
type(d[k]) == complex) ])
isinstance(d[k], numbers.Number)])
return d
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