Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define long() in Python 3 #230

Merged
merged 2 commits into from
Jan 22, 2019
Merged

Define long() in Python 3 #230

merged 2 commits into from
Jan 22, 2019

Conversation

cclauss
Copy link

@cclauss cclauss commented Jun 13, 2018

long() was remove in Python 3 in favor of int().

@coveralls
Copy link

coveralls commented Jun 13, 2018

Coverage Status

Coverage decreased (-0.02%) to 91.685% when pulling ffd265b on cclauss:patch-5 into effc2e5 on google:master.

@cclauss cclauss mentioned this pull request Jun 13, 2018
cclauss added 2 commits December 22, 2018 23:48
__long()__ was remove in Python 3 in favor of __int()__.
@tvalentyn
Copy link
Contributor

This change LGTM.
@kevinli7 could you help review / merge this?

Copy link
Contributor

@kevinli7 kevinli7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer this:

import six
if six.PY3:
long = int

or

import sys
if sys.version > (3,):
long = int

@tvalentyn
Copy link
Contributor

I don't have a strong opinion, but FYI feature detection is also acceptable and recommended in https://docs.python.org/3/howto/pyporting.html#use-feature-detection-instead-of-version-detection

@kevinli7
Copy link
Contributor

Thanks for the reference. That's fine then.

1 similar comment
@kevinli7
Copy link
Contributor

Thanks for the reference. That's fine then.

@kevinli7 kevinli7 merged commit 99f119e into google:master Jan 22, 2019
@cclauss cclauss deleted the patch-5 branch January 22, 2019 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants