> Seeing the legacy vimscript func* Test_python3_vars()* in 
> *src\testdir\test_python3.vim*, 
> 
> Can you confirm that in vim9script, those setlines test are no possible to 
> be written in same way to be passed to python3 world ?
> 
> func Test_python3_vars()
>   let g:foo = 'bac'              -- << -- THE ONLY ONE CAN BE USED in vim9 ?
>   let w:abc3 = 'def'            -- << -- NOT POSSIBLE in vim9
>   let b:baz = 'bar'               -- << -- NOT POSSIBLE in vim9
>   let t:bar = 'jkl'                   -- << -- NOT POSSIBLE in vim9
I guess you mean that in Vim9 script and in a :def function the "let"
command doesn't work.  You can just leave it out, e.g.:
   w:abc3 = 'def'
> Beyond a simple variable, is it possible to move a VIM9 class to the 
> python3 world?
You mean to pass a reference of the class and use it in Python?  No,
that is not possible.  The class implementation is only halfway, but
even when the work has been done a Python script will not be able to
access a Vim class directly.  You can only use it in a Vim script
context, such as using "vim.eval()".
-- 
Do not trust atoms, they make up everything.
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20230531114816.CA8211C1B32%40moolenaar.net.
Wednesday, May 31, 2023
Subscribe to:
Post Comments (Atom)
 
No comments:
Post a Comment