From a3eeeb20e77ab5a9fc27c48f840fca0309701ad3 Mon Sep 17 00:00:00 2001 From: Alex Ayon Date: Thu, 4 Jul 2019 07:41:15 -0500 Subject: [PATCH] Update 1-serialization.md (#6781) Assigning a sorted list to STYLE_CHOICES by using a list comprehension. --- docs/tutorial/1-serialization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/1-serialization.md b/docs/tutorial/1-serialization.md index 22fe49e39..a05427a5e 100644 --- a/docs/tutorial/1-serialization.md +++ b/docs/tutorial/1-serialization.md @@ -60,7 +60,7 @@ For the purposes of this tutorial we're going to start by creating a simple `Sni LEXERS = [item for item in get_all_lexers() if item[1]] LANGUAGE_CHOICES = sorted([(item[1][0], item[0]) for item in LEXERS]) - STYLE_CHOICES = sorted((item, item) for item in get_all_styles()) + STYLE_CHOICES = sorted([(item, item) for item in get_all_styles()]) class Snippet(models.Model):