mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #20989 -- Removed explicit list comprehension inside dict() and tuple()
Thanks jeroen.pulles at redslider.net for the suggestion and helper script.
This commit is contained in:
		| @@ -78,7 +78,7 @@ class ExtendsNode(Node): | ||||
|         self.nodelist = nodelist | ||||
|         self.parent_name = parent_name | ||||
|         self.template_dirs = template_dirs | ||||
|         self.blocks = dict([(n.name, n) for n in nodelist.get_nodes_by_type(BlockNode)]) | ||||
|         self.blocks = dict((n.name, n) for n in nodelist.get_nodes_by_type(BlockNode)) | ||||
|  | ||||
|     def __repr__(self): | ||||
|         return '<ExtendsNode: extends %s>' % self.parent_name.token | ||||
|   | ||||
		Reference in New Issue
	
	Block a user