tropo / tropo-webapi-python

A set of Python classes for working with the Tropo WebAPI
MIT License
85 stars 33 forks source link

Make compatible with Python3 #39

Open chadmiller opened 8 years ago

chadmiller commented 8 years ago

Code had only a few reasons it wasn't compatible with Python3, and most of them were bugs.

1) Inconsistent indentation. Sometimes tabs, sometimes spaces. That's a recipe for trouble and that's why Python3 forbids it.

2) Ambiguity about whether the API values are bytestrings or unicode. Being unsure is a sin, and Python 3 forces clear thinking here. No behavior change for Py2, but Py 3 accepts using only unicode, and we encode at the borders, when fabricating the JSON to send out.

3) print is a function in Python 3, not a statement, so those prints have to look like function calls. That was surprisingly few changes, and only one place had non-one arguments.

johntdyer commented 8 years ago

@JustinDupree you have anyone available to review this ?

AdamNiederer commented 8 years ago

I was just about to do this myself. Thanks!