- 1
what is python 3 equivalent of that code??
if 'title' in request.json and type(request.json['title']) != unicode: abort(400) I can't figure out the correct way to use isinstance
2 Respostas
+ 7
Sounds like it's Python code already ( no matter 2 or 3 ), not javascript as you tag it... and using some web serving module and/or framework ^^
Anyway, what's you real question? about the 2 lines of code or the unrelated 'isinstance'?
- 1
Already got a clear simpler way
type(request.json['title']) != str: