tpope / vim-fireplace

fireplace.vim: Clojure REPL support
https://www.vim.org/scripts/script.php?script_id=4978
1.75k stars 139 forks source link

Fixing Python3 Octal Constant Compatibility Issue #130

Closed andrewwong1221 closed 10 years ago

andrewwong1221 commented 10 years ago

Vim was displaying an syntax error in nrepl_fireplace.py when opening a clj file while running Python 3.3.3.

According to http://docs.python.org/3.0/whatsnew/3.0.html, Octal constants of the form '037' were deprecated in Python 3. The preferred form for both Python 2.6+ and Python 3 compatibility is to use '0o037'.

tpope commented 10 years ago

Breaks 2.4, which apparently is still alive in the wild as well. Can you just change them to decimal?

andrewwong1221 commented 10 years ago

Sounds reasonable to me

Python 2.7.6 (default, Jan  8 2014, 01:28:38)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 000
0
>>> 037
31
tpope commented 10 years ago

Please fix your commit message.

andrewwong1221 commented 10 years ago

Commit message fixed.

tpope commented 10 years ago

Thanks!