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

Update 50-sets.md #98

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -164,7 +164,7 @@ Why? Because it won't work like you'd expect it to.

If you need to use a mutable type, like a `list` as a default, use a *marker* instead. We'll cover this technique when we talk about `list`s in the next chapter.

In Python, default arguments are evaluated only once -- when the unction is defined. Not each time the function is called. That means if you use a value that can be changed, it won't behave like you'd expect it to.
In Python, default arguments are evaluated only once -- when the function is defined. Not each time the function is called. That means if you use a value that can be changed, it won't behave like you'd expect it to.

### Naming Functions and Arguments

@@ -189,4 +189,4 @@ For example, I'd expect a variable called `name` to be a single string, and a va

{{% notice tip %}}
A great resource to help you figure out the best naming conventions to use in your production Python code is a talk by Brandon Rhodes, called ["The Naming of Ducks: Where Dynamic Types Meet Smart Conventions"](https://www.youtube.com/watch?v=YklKUuDpX5c).
{{% /notice %}}
{{% /notice %}}