Skip to content

builtin: Implement builtin sum #21

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Sep 4, 2018
Merged

Conversation

corona10
Copy link
Collaborator

Implement built-in sum.

@codecov-io
Copy link

codecov-io commented Aug 31, 2018

Codecov Report

Merging #21 into master will increase coverage by 0.05%.
The diff coverage is 82.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #21      +/-   ##
==========================================
+ Coverage    64.5%   64.55%   +0.05%     
==========================================
  Files          55       55              
  Lines        9740     9768      +28     
==========================================
+ Hits         6283     6306      +23     
- Misses       3010     3013       +3     
- Partials      447      449       +2
Impacted Files Coverage Δ
builtin/builtin.go 75.2% <82.14%> (+0.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ed3c651...ba56f58. Read the comment docs.

@corona10
Copy link
Collaborator Author

@ncw PTAL

@corona10
Copy link
Collaborator Author

corona10 commented Sep 1, 2018

@sbinet I've updated PTAL

@corona10
Copy link
Collaborator Author

corona10 commented Sep 1, 2018

@ncw Can you take a look?

Copy link
Collaborator

@ncw ncw left a comment

Choose a reason for hiding this comment

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

I think this OK apart from the tests not passing under py3test. If you rebase to master then you'll get the testing stuff in travis and you can see what I mean.

try:
sum(['h', 'i'])
except TypeError as e:
if e.args[0] != "unsupported operand type(s) for +: 'int' and 'string'":
Copy link
Collaborator

Choose a reason for hiding this comment

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

This fails under python3 because the error message is actually

TypeError: unsupported operand type(s) for +: 'int' and 'str'

I'll work on getting py3test into the CI

@corona10
Copy link
Collaborator Author

corona10 commented Sep 3, 2018

@ncw
Your CL is awesome!
I 've rebased the master and fix a code which is related to failing.
PTAL

Copy link
Member

@sbinet sbinet 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 probably leave the s/"string"/"str"/ change in its own commit, but ok.

LGTM.

@ncw
Copy link
Collaborator

ncw commented Sep 4, 2018

Look great now - thanks :-)

@corona10 corona10 merged commit 09f14d0 into go-python:master Sep 4, 2018
@corona10 corona10 deleted the builtin_sum branch September 4, 2018 14:48
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants