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

Fixed #166 -- Highlight the significance of the double underscore syntax #169

Merged
merged 1 commit into from
Nov 8, 2014

Conversation

bmispelon
Copy link
Contributor

No description provided.

@@ -141,6 +141,8 @@ What about `def publish(self):`? It is exactly our `publish` method we were talk

Methods very often `return` something. There is an example of that in the `__str__` method. In this scenario, when we call `__str__()` we will get a text (**string**) with a Post title.

> **Note** Yes, there are two undescore characters (`_`) on each side. Those are used frequently in Python and sometimes we also call them "dunder" (short for "double-underscore").
Copy link
Contributor

Choose a reason for hiding this comment

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

I would put this after the example beneath "Let's open blog/models.py" so that students can double check what the just typed in. e.g. "Double check that you used two underscores on each side of str...."

@bmispelon
Copy link
Contributor Author

Force pushed some changes. Looks good?

@timgraham
Copy link
Contributor

Yes

@bmispelon bmispelon merged commit 6335c99 into master Nov 8, 2014
@bmispelon bmispelon deleted the issue-166 branch November 8, 2014 16:15
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.

2 participants