Add some comments and docstrings.
PyLint suggestions.

- Better function names.
- attributes in __init__
- Unused variables -> _
- Remove unused code, simplify expressions.
More explicit default vars.

Don't use argument lists for default values when they can be in the function body.
Remove unused import.
Use printexceptions instead of try/except/print
Move objtype decorator into correct scope.
Whitespace.
Invert logic for shorter function.
LDAPSession._conn is public => conn.
Methods can be static.
Add an error message.
Refactor LDAPShell creation out of main.