大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。
Jetbrains全家桶1年46,售后保障稳定
如下所示:
m_start =date +’ 09:00′
m_end =date +’ 13:00′
rsv_1 ={
‘act’:’set_resv’,
‘dev_id’:dev_id,
‘start’:m_start,
‘end’:m_end,
}
”’
rsv_2 ={
‘_’:”,
‘act’:’set_resv’,
‘dev_id’:dev_id,
‘start’:’2018-05-21 13:00′,
‘end_time’:”,
‘kind_id’:”,
‘lab_id’:”,
‘memo’:”,
‘prop’:”,
‘room_id’:”,
‘end’:’2018-05-21 17:00′,
‘start_time’:”,
‘term’:”,
‘test_id’:”,
‘test_name’:”,
‘type_name’:”,
‘type’:’dev’,
‘up_file’:”,
}
rsv_3 ={
‘_’:”,’act’:’set_resv’,
‘dev_id’:dev_id,
‘start’:’2018-05-21 17:00′,
‘end_time’:”,
‘kind_id’:”,
‘lab_id’:”,
‘memo’:”,
‘prop’:”,
‘room_id’:”,
‘end’:’2018-05-21 21:00′,
‘start_time’:”,
‘term’:”,
‘test_id’:”,
‘test_name’:”,
‘type_name’:”,
‘type’:’dev’,
‘up_file’:”,
}
”’
session =requests.Session()
req = session.post(init_url,data=keywords,headers=headers)
注意,这里的多行注释会报缩进错误,原因是因为python用缩进标志程序块,包括注释,所以,注释同样要注意与所要注释的程序块对齐.
改进如下,请注意下面代码中多行缩进的缩进情况:
m_start =date +’ 09:00′
m_end =date +’ 13:00′
rsv_1 ={
‘act’:’set_resv’,
‘dev_id’:dev_id,
‘start’:m_start,
‘end’:m_end,
}
”’
rsv_2 ={
‘_’:”,
‘act’:’set_resv’,
‘dev_id’:dev_id,
‘start’:’2018-05-21 13:00′,
‘end_time’:”,
‘kind_id’:”,
‘lab_id’:”,
‘memo’:”,
‘prop’:”,
‘room_id’:”,
‘end’:’2018-05-21 17:00′,
‘start_time’:”,
‘term’:”,
‘test_id’:”,
‘test_name’:”,
‘type_name’:”,
‘type’:’dev’,
‘up_file’:”,
}
rsv_3 ={
‘_’:”,’act’:’set_resv’,
‘dev_id’:dev_id,
‘start’:’2018-05-21 17:00′,
‘end_time’:”,
‘kind_id’:”,
‘lab_id’:”,
‘memo’:”,
‘prop’:”,
‘room_id’:”,
‘end’:’2018-05-21 21:00′,
‘start_time’:”,
‘term’:”,
‘test_id’:”,
‘test_name’:”,
‘type_name’:”,
‘type’:’dev’,
‘up_file’:”,
}
”’
session =requests.Session()
req = session.post(init_url,data=keywords,headers=headers)
以上这篇解决python多行注释引发缩进错误的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持谷谷点程序。
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/226892.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...