-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Added __str__() term to Python Dunder Methods #1425
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
Conversation
SSwiniarski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrickevans29, I did a first review and left a few comments, mostly regards to spacing in the code. We use two spaces to indent, rather than tabs.
Co-authored-by: SSwiniarski <86081858+SSwiniarski@users.noreply.github.com>
Co-authored-by: SSwiniarski <86081858+SSwiniarski@users.noreply.github.com>
Co-authored-by: SSwiniarski <86081858+SSwiniarski@users.noreply.github.com>
Co-authored-by: SSwiniarski <86081858+SSwiniarski@users.noreply.github.com>
Co-authored-by: SSwiniarski <86081858+SSwiniarski@users.noreply.github.com>
Co-authored-by: SSwiniarski <86081858+SSwiniarski@users.noreply.github.com>
|
Thanks @SSwiniarski I've just commited those changes. |
SSwiniarski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrickevans29, looks good for a second review.
Dusch4593
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrickevans29 Just had a few comments/suggestions. Looks solid already, though! 👍🏻
Good to know, thanks! Co-authored-by: Brandon Dusch <brandondusch@gmail.com>
Dusch4593
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrickevans29 This looks good to merge! 👍🏻
I made the following edits in 82abab4 before doing so:
- Slight rephrase on line # 21.
- Added empty line between end of ```pseudo snippet and new text (to get the GitHub checks to pass).
- Specified different ways
__str__()is called on line # 33 under "Codebyte Example."- Changed variable name to
homesince this is the onlyHomeobject used in the example.
- Changed variable name to
|
👋 @patrickevans29 |
|
Congrats and thank you for contributing to Codecademy Docs! 😄 The new entry should now be live: https://www.codecademy.com/resources/docs/python/dunder-methods/str Currently, your profile is anonymously listed on the entry page. To make it visible, you'll need to do the following:
Looking forward to your next Docs contribution! 👍🏻 |

Description
I have created a new term entry for the str() method under the Dunder Methods concept. I closely followed the structure of the pre-existing init and repr methods.
Type of Change
Checklist
mainbranch.