ZyX wrote:
> vim.Options.__iter__ makes it possible to iterate over option names: i.e.
>
> for oname in vim.options:
> print('Global option {0} has value {1!r}'.format(oname,
> vim.options[oname]))
>
> prints
>
> Global option aleph has value 224
> Global option arabicshape has value True
>
> and so on.
>
> vim.Options.__contains__ makes it possible to check whether some option
> exists:
>
> if 'cole' not in vim.options:
> print('Compiled without +conceal')
>
> (note that `if 'conceallevel' in vim.options:` (full option name) will
> work even without this part due to vim.Options.__iter__.
> vim.Options.__contains__ is faster though.)
>
> # HG changeset patch
> # User ZyX <[email protected]>
> # Date 1383332303 -14400
> # Fri Nov 01 22:58:23 2013 +0400
> # Branch python-.options
> # Node ID f332d6dfb4749c7fc7f1f4961b8e817ce3cba46b
> # Parent 92c9748e0ccbc42a5e28ce8fb9b8818e756a06da
> Add options iterator
Thanks. I'll add it in the todo list.
--
A special law prohibits unmarried women from parachuting on Sunday or she
shall risk arrest, fine, and/or jailing.
[real standing law in Florida, United States of America]
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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.