From c913730549f834a2770ad2ced360bec0213ef913 Mon Sep 17 00:00:00 2001 From: KrisYu Date: Sat, 22 Oct 2016 12:30:24 -0500 Subject: [PATCH] =?UTF-8?q?missing=20quote=20=E2=80=98=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_base.py b/python_base.py index b191406..67daae5 100644 --- a/python_base.py +++ b/python_base.py @@ -191,7 +191,7 @@ # 普通调用 "{0}, {1} and {2}".format('spam', 'ham', 'eggs') # 基于位置的调用 "{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) "my {1[spam]} runs {0.platform}".format(sys, {'spam':'laptop'}) # 基于位置的键和属性 "{config[spam]} {sys.platform}".format(sys = sys, config = {'spam':'laptop'}) # 基于Key的键和属性