> Not everything is compatible between Python 2 and 3 though. Is there a
> way to do:
>
> if python3:
> do-it-this-way
> else:
> do-it-that-way
>
> Then :pyx would really work. Is that possible without getting errors
> for some code that works only in one versin?
It is possible, check out powerline for example. Most of time it does not use
such straightforward approach though:
try:
from __builtin__ import unicode # Python 2
except ImportError:
unicode = str # Python 3
, but if one needs it there is
if sys.version_info < (3,):
# Python 2
else:
# Python 3
> In the patch the docs have the section "Python 3" twice.
>
> The default for 'pythonx' should be zero when build with both Python 2
> and 3. Then the first Python command sets it.
>
> Should be called 'pythonversion' actually.
Maybe 'pythonxversion'? One key longer, but it makes clear who uses this option.
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.