- fix assertion for py26
- fix division for python3