[問題]關於移植 code from python 2.7 to 3.6
請問一下於python 2.7 中
self.currentini = {'debug' : 'on'}
def verify_currentlyini(self,(key,value)):
self.currentini[str(key).split('$')[1]]=str(value)
但是更改python 3.6
self.currentini = {'debug' : 'on'}
def verify_currentlyini(self,key,value):
self.currentini[str(key).split('$')[1]]=str(value)
TypeError: modify_currentlyini() missing 1 required positional argument:
'value'
請問大家該如何更改我的程式 ?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.200.200.9
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1530624366.A.149.html
推
07/03 21:33,
6年前
, 1F
07/03 21:33, 1F
→
07/03 23:32,
6年前
, 2F
07/03 23:32, 2F
→
07/04 09:14,
6年前
, 3F
07/04 09:14, 3F
推
07/04 09:27,
6年前
, 4F
07/04 09:27, 4F
→
07/04 11:18,
6年前
, 5F
07/04 11:18, 5F
→
07/04 11:19,
6年前
, 6F
07/04 11:19, 6F
→
07/04 13:16,
6年前
, 7F
07/04 13:16, 7F
→
07/04 14:26,
6年前
, 8F
07/04 14:26, 8F
→
07/04 14:27,
6年前
, 9F
07/04 14:27, 9F
推
07/04 15:08,
6年前
, 10F
07/04 15:08, 10F
推
07/04 22:33,
6年前
, 11F
07/04 22:33, 11F
→
07/12 08:42,
6年前
, 12F
07/12 08:42, 12F
→
07/12 08:43,
6年前
, 13F
07/12 08:43, 13F
→
07/12 08:43,
6年前
, 14F
07/12 08:43, 14F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):