Loading ...
Sorry, an error occurred while loading the content.

Re: [RFC] Adding alias command to ease supporting Python 2 and 3.

Expand Messages
  • INADA Naoki
    You re right, but... Actually it doesn t. Python 2 and 3 are not compatible. You can t use ... These days, many Python libraries support both of Python 2 and
    Message 1 of 7 , Apr 4, 2013
    • 0 Attachment
      You're right, but...

      Actually it doesn't.  Python 2 and 3 are not compatible.  You can't use
      :python  without knowing what version it is.

      These days, many Python libraries support both of Python 2 and 3 in one source.
      For those, Python 2 and 3 are compatible at some level.

      Jedi-vim uses alias command like this:
      
      
      if has('python')
          command! -nargs=1 Python python <args>
      else
          command! -nargs=1 Python python3 <args>
      end

      But, user defined commands can't be script/plugin local.
      So having standard command like it is good idea.

       
       Therefore :python will
      always mean Python 2.  Otherwise some percentage of the scripts will
      just not work.

      If vim is build with -python +python3, those script just not work, too.
      So, :python fallback to python3 doesn't break any scripts.
       

      --
      INADA Naoki  <songofacandy@...>

      --
      --
      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 vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
       
       
    • Naoki INADA
      This path makes :python fallback to :pytohn3 when -python and +python3. -- -- You received this message from the vim_dev maillist. Do not top-post! Type your
      Message 2 of 7 , Apr 5, 2013
      • 0 Attachment
        This path makes :python fallback to :pytohn3 when -python and +python3.

        --
        --
        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 vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      Your message has been successfully submitted and would be delivered to recipients shortly.