1.1 --- a/python.editor/src/org/netbeans/modules/python/editor/PythonCodeCompleter.java Thu Sep 24 08:11:31 2015 +0200
1.2 +++ b/python.editor/src/org/netbeans/modules/python/editor/PythonCodeCompleter.java Thu Sep 24 08:31:58 2015 +0200
1.3 @@ -1570,8 +1570,13 @@
1.4 return true;
1.5 }
1.6
1.7 - // Keywords - according to http://docs.python.org/ref/keywords.html
1.8 + // According to https://hg.python.org/cpython/file/3.5/Lib/keyword.py
1.9 + // and https://hg.python.org/cpython/file/2.7/Lib/keyword.py
1.10 + // duplicate in org.netbeans.modules.python.source.PythonUtils
1.11 static final String[] PYTHON_KEYWORDS = new String[]{
1.12 + "False", // NOI18N
1.13 + "None", // NOI18N
1.14 + "True", // NOI18N
1.15 "and", // NOI18N
1.16 "as", // NOI18N
1.17 "assert", // NOI18N
1.18 @@ -1583,7 +1588,6 @@
1.19 "elif", // NOI18N
1.20 "else", // NOI18N
1.21 "except", // NOI18N
1.22 - "exec", // NOI18N
1.23 "finally", // NOI18N
1.24 "for", // NOI18N
1.25 "from", // NOI18N
1.26 @@ -1593,16 +1597,20 @@
1.27 "in", // NOI18N
1.28 "is", // NOI18N
1.29 "lambda", // NOI18N
1.30 + "nonlocal", // NOI18N
1.31 "not", // NOI18N
1.32 "or", // NOI18N
1.33 "pass", // NOI18N
1.34 - "print", // NOI18N
1.35 "raise", // NOI18N
1.36 "return", // NOI18N
1.37 "try", // NOI18N
1.38 "while", // NOI18N
1.39 "with", // NOI18N
1.40 "yield", // NOI18N
1.41 + "async", // NOI18N, Python 3.5 only
1.42 + "await", // NOI18N, Python 3.5 only
1.43 + "exec", // NOI18N, Python 2 only
1.44 + "print", // NOI18N, Pytohn 2 only, function in python 3
1.45 };
1.46
1.47 private void completeKeywords(List<CompletionProposal> proposals, CompletionRequest request) {
2.1 --- a/python.source/src/org/netbeans/modules/python/source/PythonUtils.java Thu Sep 24 08:11:31 2015 +0200
2.2 +++ b/python.source/src/org/netbeans/modules/python/source/PythonUtils.java Thu Sep 24 08:31:58 2015 +0200
2.3 @@ -189,6 +189,7 @@
2.4
2.5 // According to https://hg.python.org/cpython/file/3.5/Lib/keyword.py
2.6 // and https://hg.python.org/cpython/file/2.7/Lib/keyword.py
2.7 + // Duplicate in org.netbeans.modules.python.editor.PythonCodeCompleter
2.8 static final String[] PYTHON_KEYWORDS = new String[]{
2.9 "False", // NOI18N
2.10 "None", // NOI18N