On Jun 3, 2013 9:55 AM, "Marc Weber" <[email protected]> wrote:
>
> Excerpts from ZyX's message of Sun Jun 02 12:58:10 +0200 2013:
> >     execfile(filename, {}, {})
> Would you pass a permanent individual global state dictionary like this?
>
>   if not "foo.py" in module_globals:
>     module_globals["foo.py"] = {}
>   execfile("foo.py", module_globals["foo.py"], {})
>
> Then a plugin would have a chance to notice when it gets reloaded /
> updated. That could be nice when developing a plugin.

What for? Holding state this way will act against the reloading feature
(you will have to clear dictionary in place of using a new instance). If
one needs to hold state there are python modules. Remember: files in
pyplugin/ should contain nearly no useful code, everything is to be put
into modules. I am very unsure they are needed at all:
loadpyplugin(module[, install_arg]) is much more useful. Custom loaders in
plugin/*.vim as a fallback can at least show the error, same for
loadpyplugin() in case of absent python. What do you get with pyplugin/
without +python with python-only plugins? I guess, silence.

> Marc Weber
>
> --
> --
> 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.
>
>

-- 
-- 
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.


Raspunde prin e-mail lui