Skip to content

Conversation

@chadmiller
Copy link

@chadmiller chadmiller commented Oct 7, 2016

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.

Chad Miller added 2 commits October 7, 2016 10:00
Code had only a few reasons it wasn't compatible with Python3, and all
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
Copy link
Member

@JustinDupree you have anyone available to review this ?

@AdamNiederer
Copy link

I was just about to do this myself. Thanks!

AdamNiederer and others added 2 commits October 22, 2016 14:18
Remove hard tabs, trailing newlines, trailing spaces
Whitespace cleanups

Thanks Adam.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants