From 82e575ebfb791fecca14bfdb7987e2174700bbd6 Mon Sep 17 00:00:00 2001 From: mpuels Date: Wed, 6 Dec 2017 16:40:51 +0100 Subject: [PATCH] doc: Fix assert statement in Lightning Tour Python 3 throws an error message on the original assert statement. Also, according to the Python documentation regarding the assert statement (https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement), `assert` takes at least one argument and at most two. In the two-argument form the second argument is meant as an error message to be displayed when the assertion fails. I don't think this is intended in this case. --- website/usage/_spacy-101/_lightning-tour.jade | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/usage/_spacy-101/_lightning-tour.jade b/website/usage/_spacy-101/_lightning-tour.jade index 93068588a..45c934319 100644 --- a/website/usage/_spacy-101/_lightning-tour.jade +++ b/website/usage/_spacy-101/_lightning-tour.jade @@ -188,7 +188,10 @@ p pasta = doc[6] hippo = doc[8] assert apple.similarity(banana) > pasta.similarity(hippo) - assert apple.has_vector, banana.has_vector, pasta.has_vector, hippo.has_vector + assert apple.has_vector + assert banana.has_vector + assert pasta.has_vector + assert hippo.has_vector p | For the best results, you should run this example using the