Vip mud script #1728
Reported by dwillemv on 2011-08-19 08:33
Comment 1 by jteh on 2011-08-21 18:41
Here is some code review. Please address these comments and update the module.
First, the header comments need to be changed to conform with the rest of the NVDA code. Something like this:
Unused imports. Please remove.
Is there any reason you're using _get_states here instead of the property? If not, please change this to obj.states.
This can be done far more efficiently:
Note that you don't even need the if check, as it's not an error to delete a slice which doesn't exist; the slice is just considered empty.
Comment 4 by jteh on 2011-08-29 06:37
Just a few final things that I missed in my last review (sorry!):
This comment is probably better done as the module docstring. Put something like this just above or below the imports:
Because Python has exception handling and it's going to check the length anyway, it's probably more efficient to catch exceptions than check the length, like this:
I notice you've commented out this line:
Was this intentional? If so, the line should just be removed.