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

Add examples for object and numeric protocols #2156

Merged
merged 3 commits into from
Feb 23, 2022
Merged

Add examples for object and numeric protocols #2156

merged 3 commits into from
Feb 23, 2022

Conversation

mejrs
Copy link
Member

@mejrs mejrs commented Feb 8, 2022

Todo:

  • Add tests for all of this

@mejrs mejrs changed the title Object Add examples for object and numeric protocols Feb 8, 2022
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Lovely to see additional docs and examples added, thank you as always! Sprinkled some comments :)

guide/src/class.md Show resolved Hide resolved
guide/src/class.md Outdated Show resolved Hide resolved
guide/src/class.md Show resolved Hide resolved
guide/src/class/numeric.md Show resolved Hide resolved
guide/src/class/numeric.md Outdated Show resolved Hide resolved
guide/src/class/numeric.md Show resolved Hide resolved
guide/src/class/numeric.md Show resolved Hide resolved
guide/src/class/numeric.md Show resolved Hide resolved
guide/src/class/object.md Show resolved Hide resolved
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

LGTM; feel free to merge unless you plan to add more to this branch? One tiny typo spotted...

guide/src/class.md Outdated Show resolved Hide resolved
@@ -58,7 +58,7 @@ impl Number {
// format string, followed by any number of parameters which replace the
// `{}`'s in the format string.
//
// `.0` is how in Rust you get the first value of a tuple struct.
// 👇 Tuple field access in Rust uses a dot
Copy link
Member

Choose a reason for hiding this comment

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

Haha love this!

Copy link
Member Author

Choose a reason for hiding this comment

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

I saw this in a https://fasterthanli.me blog the other day and liked it. I figured I'd `steal copy learn from him :)

@davidhewitt davidhewitt mentioned this pull request Feb 17, 2022
@mejrs
Copy link
Member Author

mejrs commented Feb 20, 2022

I don't understand why this test is failing.

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks for adding the test! One final suggestion on a comment, then let's merge?

guide/src/class/numeric.md Outdated Show resolved Hide resolved
@davidhewitt
Copy link
Member

This'll need a rebase (or merge from master) since #2165 went in. Feel free to do that (maybe squash some of the "try fix CI" commits together) and then merge this at your leisure 👍

@mejrs
Copy link
Member Author

mejrs commented Feb 23, 2022

maybe squash some of the "try fix CI" commits together

😳

@mejrs mejrs merged commit f379854 into PyO3:main Feb 23, 2022
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.

None yet

2 participants