Am calling functions from a list as follows:
''.join([x() for x in corpus])
A function could be like this:
def findWholeWord(w):
return re.compile(r'\b({0})\b'.format(w), flags=re.IGNORECASE).search
item = ['ii']
fnval = ['i', 'we', 'cake', 'love', 'time', ]
fadmin = ['admin','give',]
G3 = [one(), two(), three()]
G4 = [four(), five()]
l = []
def testing():
while True:
for c in fnval:
if findWholeWord(c)(item[0]):
print 'yes'
for c in fadmin:
if findWholeWord(c)(item[0]):
print 'yes admin'
break
Sometimes the functions return a None value.AM also concerned about the
function not slowing down the app.
Regards
To avoid this
<type 'exceptions.TypeError'> 'NoneType' object is not callable
I want to reply to the user with a statement like "I can't find an
answer. Please refresh your question"
How can I do this
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.