prompt-toolkit / pyvim

Pure Python Vim clone.
BSD 3-Clause "New" or "Revised" License
2.52k stars 161 forks source link

Function names in pyvim/commands/commands.py #48

Closed lunemec closed 9 years ago

lunemec commented 9 years ago

Aside from pep8 screaming of redefining of the same function name all the time, wouldn't there be upside to naming those functions for debugging purposes? Now when you'd print COMMANDS_TOHANDLERS dict, you'd only get {'shortcut': <function 0x...>} and there is no telling them apart. While now this is OK, you can find the function by the @cmd decorator, when there is a ton of shortcuts, it'd be much better to have those functions with name.

If you agree, I'll send pull request with renaming.

jonathanslenders commented 9 years ago

I agree. Feel free to create a pull request.

lunemec commented 9 years ago

https://github.com/jonathanslenders/pyvim/pull/57