python3 compatibility

`SliceType` is an alias to `slice` and it was removed from python 3. looks like automatic conversion does not handle this properly. Same for other `types.*` constants.

Actually, usage of constants was not suggested since Python 2.2 days