missing quote ‘ typo

master
KrisYu 2016-10-22 12:30:24 -05:00
parent 431283a473
commit c913730549
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@
# 普通调用 # 普通调用
"{0}, {1} and {2}".format('spam', 'ham', 'eggs') # 基于位置的调用 "{0}, {1} and {2}".format('spam', 'ham', 'eggs') # 基于位置的调用
"{motto} and {pork}".format(motto = 'spam', pork = 'ham') # 基于Key的调用 "{motto} and {pork}".format(motto = 'spam', pork = 'ham') # 基于Key的调用
"{motto} and {0}".format(ham, motto = 'spam') # 混合调用 "{motto} and {0}".format('ham', motto = 'spam') # 混合调用
# 添加键 属性 偏移量 (import sys) # 添加键 属性 偏移量 (import sys)
"my {1[spam]} runs {0.platform}".format(sys, {'spam':'laptop'}) # 基于位置的键和属性 "my {1[spam]} runs {0.platform}".format(sys, {'spam':'laptop'}) # 基于位置的键和属性
"{config[spam]} {sys.platform}".format(sys = sys, config = {'spam':'laptop'}) # 基于Key的键和属性 "{config[spam]} {sys.platform}".format(sys = sys, config = {'spam':'laptop'}) # 基于Key的键和属性