Bonjour,
J'ai copié ce code
Lors de l'exécution, j'obtiens cette erreur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 #!/usr/bin/env python # -*- coding: utf-8 -*- # vim: set fileencoding=utf-8 : import nltk from vector_dict.VectorDict import VectorDict v = { 'a' : { 'a' : { 'b' : 1 } } } w = VectorDict() w.add_path( [ 'a', 'a', "c", 5 ] ) 'vector_dict.VectorDict.VectorDict'>, {'b': 1})})}) ('a', 'a', 'c', 5) print ("???") w.pprint()
Le package VectorDict-1.0.0 est installé.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 Traceback (most recent call last): File "C:\Users\......\t_vector0.py", line 6, in <module> from vector_dict.VectorDict import VectorDict File "C:\Users\et\AppData\Local\Programs\Python\Python36\lib\site-packages\vector_dict\VectorDict.py", line 1034 print self.pformat() ^ SyntaxError: invalid syntax
la ligne 1034 du fichier VectorDict.py semble être à l'origine du problème
Quel est votre avis ou quelle correction appliquer sur la ligne : print self.pformat()
Merci pour votre aide.
Alain
Partager