type converted to isinstance

This commit is contained in:
Piotr Mitros
2012-03-28 17:11:14 -04:00
parent 59dfb2cfd4
commit adf483a96b
2 changed files with 3 additions and 3 deletions

1
.gitignore vendored
View File

@@ -10,3 +10,4 @@ db.newaskbot
db.oldaskbot
flushdb.sh
build
\#*\#

View File

@@ -1,5 +1,6 @@
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):