> OK. But there still remains the question of discrepancy between:
>
> class A:
> filter = None
Here filter is a variable locally scoped to the block defined by A, in that
sense this is not different from:
def a():
filter = None
Both clashes with the "auto-global" builtin.
Fortunately the most common case will be:
class A:
def filter(...): ...
where filter would be highlighted because of the def anyway.
> and:
>
> a = A()
> a.filter = 2
Here a (and even A) is a potential offender but not filter, which is
resolved inside a.
The rule is simple: an unqualified variable named like a builtin is
highlighted to signal potential mistakes / bad smell.
There already is a variable to control highlighting of builtins. Currently
it's a toggle but it could have 3 levels instead:
0: never.
1: only unqualified.
2: always.
Heuristically I think 1 does a better job, but you can set the default to 2
if you prefer.
Cheers
--
Carlos
--
--
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/d/optout.