summaryrefslogtreecommitdiff
path: root/docs/intro
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-11-27 02:41:27 +0200
committerTim Graham <timograham@gmail.com>2014-12-03 14:27:38 -0500
commit560b4207b1490a7d0cbf70cfbeba7daf2082e5be (patch)
tree9656c5e6a5d0de63024bb5ff2291963f4f236100 /docs/intro
parent50c1d8f24b0d04c813b3dd34720df86446091afa (diff)
Removed redundant numbered parameters from str.format().
Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".
Diffstat (limited to 'docs/intro')
-rw-r--r--docs/intro/contributing.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/intro/contributing.txt b/docs/intro/contributing.txt
index b1fb7b0ef6..d305a8bb91 100644
--- a/docs/intro/contributing.txt
+++ b/docs/intro/contributing.txt
@@ -325,7 +325,7 @@ the following ``render`` method after the existing ``__init__`` method::
value = force_text(self._format_value(value))
final_attrs = {'href': mark_safe(smart_urlquote(value))}
html = format_html(
- '<p class="url">{0} <a {1}>{2}</a><br />{3} {4}</p>',
+ '<p class="url">{} <a {}>{}</a><br />{} {}</p>',
_('Currently:'), flatatt(final_attrs), value,
_('Change:'), html
)
@@ -443,7 +443,7 @@ This patch file contains all your changes and should look this:
+ value = force_text(self._format_value(value))
+ final_attrs = {'href': mark_safe(smart_urlquote(value))}
+ html = format_html(
- + '<p class="url">{0} <a {1}>{2}</a><br />{3} {4}</p>',
+ + '<p class="url">{} <a {}>{}</a><br />{} {}</p>',
+ _('Currently:'), flatatt(final_attrs), value,
+ _('Change:'), html
+ )