Skip to content
Snippets Groups Projects
Commit 4f70169d authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[python mode] Default to Python 3

parent 5fea9c57
No related branches found
No related tags found
No related merge requests found
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
if (parserConf.extra_builtins != undefined) if (parserConf.extra_builtins != undefined)
myBuiltins = myBuiltins.concat(parserConf.extra_builtins); myBuiltins = myBuiltins.concat(parserConf.extra_builtins);
var py3 = parserConf.version && parseInt(parserConf.version, 10) == 3 var py3 = parserConf.version && Number(parserConf.version) < 3
if (py3) { if (py3) {
// since http://legacy.python.org/dev/peps/pep-0465/ @ is also an operator // since http://legacy.python.org/dev/peps/pep-0465/ @ is also an operator
var singleOperators = parserConf.singleOperators || /^[\+\-\*\/%&|\^~<>!@]/; var singleOperators = parserConf.singleOperators || /^[\+\-\*\/%&|\^~<>!@]/;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment