【发布时间】:2017-05-25 15:09:20
【问题描述】:
对于字符串,是输出
from bottle import route
@route('/')
def index():
return '4'
如果是int,则不输出
·为什么?
from bottle import route
@route('/')
def index():
return 4
环境
・Python 3.6
・bottel 0.13
・铬
【问题讨论】:
-
FWIW,HTTP 请求无论如何都不能返回“int”; HTTP 响应是纯文本。我不知道瓶子是否会丢弃非字符串返回类型,或者是否有其他原因......