Skip to content

Conversation

@konstin
Copy link
Member

@konstin konstin commented Jul 21, 2019

This is a prove of concept to how we can support dunder methods/protocols without specialization using inventory. Currently the only implemented method is __add__.

I don't have the time to bring this into a mergeable state or extend it to all dunder methods, so feel free to take this branch as a starting point.

@codecov
Copy link

codecov bot commented Jul 21, 2019

Codecov Report

Merging #552 into master will decrease coverage by 0.12%.
The diff coverage is 78.26%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #552      +/-   ##
==========================================
- Coverage   87.61%   87.49%   -0.13%     
==========================================
  Files          65       65              
  Lines        3449     3470      +21     
==========================================
+ Hits         3022     3036      +14     
- Misses        427      434       +7
Impacted Files Coverage Δ
src/ffi3/object.rs 93.33% <ø> (ø) ⬆️
src/type_object.rs 89.2% <100%> (ø) ⬆️
src/class/number.rs 92.9% <71.42%> (-1.3%) ⬇️
src/class/methods.rs 86.04% <80%> (-3.24%) ⬇️

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 58e17be...566a70c. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Jul 21, 2019

Codecov Report

Merging #552 into master will decrease coverage by 0.12%.
The diff coverage is 78.26%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #552      +/-   ##
==========================================
- Coverage   87.61%   87.49%   -0.13%     
==========================================
  Files          65       65              
  Lines        3449     3470      +21     
==========================================
+ Hits         3022     3036      +14     
- Misses        427      434       +7
Impacted Files Coverage Δ
src/ffi3/object.rs 93.33% <ø> (ø) ⬆️
src/type_object.rs 89.2% <100%> (ø) ⬆️
src/class/number.rs 92.9% <71.42%> (-1.3%) ⬇️
src/class/methods.rs 86.04% <80%> (-3.24%) ⬇️

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 58e17be...566a70c. Read the comment docs.

methods
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't the selection of the PyNumberProtocolImpl impl depend upon specialisation? This branch doesn't compile for me on nightly 2019-11-09.

@konstin konstin closed this Dec 17, 2019
@kngwyu kngwyu mentioned this pull request Dec 22, 2019
3 tasks
@konstin konstin deleted the poc-dunder-without-specialization branch September 23, 2021 10:57
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