On Jun 4, 2013 3:26 AM, "Marc Weber" <[email protected]> wrote: > > Excerpts from ZyX ZyX's message of Mon Jun 03 23:11:58 +0200 2013: > > The discussion has now gone into the direction when I will be against > > automatic sourcing of anything related to python. > Wow.. peace. I don't want to be offensive. And its hard to follow this > argument. "this direction" is not very descriptive.
I am no longer seeing why automatic sourcing of any python file from any directory should exist in case loadpyplugin() is implemented. > My goals: > - make python (or any other scripting language) be as powerful as VimL > is. Thus if we extend python, try to use an interface which can be > extended to also include ruby, perl, .. > - keep simple things simple > - allow complicated things > > If you think differently, then put your ideas / thoughts on your draft page > https://gist.github.com/ZyX-I/5561409 so that I can take time, read it > up, and think about it. > > The idea is to: > 1) gather what I/you/ others want > 2) find all ways which could help getting there > 3) list pro/cons > 4) decide on a solution and start implementing the most valuable > features first. > > I'm not sure in which phase we are. pythonx clearly showed that > we may be stuck at 1). You should have separated code. Code with pythonx commands and functions did not cause discussion, automatic loading did. > Improving python support is not the most simple thing, and we should try > hard to get it right for everybody who is interested in it. > Ensuring this requires us to talk about what we want. > > What I've learned by your input (thanks!): > - I can import/access the global namespace called __main__ always > - It is good and easily possible to hide plugin initialization code from > each other > > I've updated my file: > http://vim-wiki.mawercer.de/wiki/vim74/improving-python-support-drafts.html > > Please pay attention to the comparing-execfile-vs-load_source link. > > Summary: load_source puts variables and functions in both locals() > and globals() whereas execfile puts assigments into globals() and > functions into locals() There are no locals in case using load_source. It does not put things into both, there just is only one dictionary. If I wrote the implementation though it will also show the same: why take care about two dictionaries when you can leave with one? In python code writing execfile(, {}, {}) is faster then saving dict somewhere thus I used this in illustration, but in C it would be the opposite. In any case with proposed contents of file it is irrelevant. > Does this make a difference matter? I've not been aware of that > difference. > > If you have arguments for one or the other solution then just edit that > wiki file. > > 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.
