aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authortmartins <thigm85@gmail.com>2020-07-07 10:27:09 +0200
committertmartins <thigm85@gmail.com>2020-07-07 10:27:09 +0200
commitab41b91f89a450e657bd1a14592bb9c17333fbfb (patch)
tree42c5d6f7fec50443807449781c31e3b17ca3f751 /python
parente9eecc937cdc2dc4925904c1f0e986efcb016269 (diff)
more compact expression
Diffstat (limited to 'python')
-rw-r--r--python/vespa/vespa/package.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/python/vespa/vespa/package.py b/python/vespa/vespa/package.py
index ed0aa047805..48c21ea91ed 100644
--- a/python/vespa/vespa/package.py
+++ b/python/vespa/vespa/package.py
@@ -74,10 +74,7 @@ class Document(ToJson, FromJson["Document"]):
Object representing a Vespa document.
"""
- if not fields:
- fields = []
-
- self.fields = fields
+ self.fields = [] if not fields else fields
def add_fields(self, *fields: Field):
"""