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

Feedback on 2.6.2, Modifying A Set #54

Open
jwhendy opened this issue Sep 15, 2017 · 0 comments
Open

Feedback on 2.6.2, Modifying A Set #54

jwhendy opened this issue Sep 15, 2017 · 0 comments

Comments

@jwhendy
Copy link

jwhendy commented Sep 15, 2017

I'd not worked with sets before reading this book. I found this wording a little confusing:

(1) The update() method takes one argument, a set, and adds all its members to the original set. It’s as if you called the add() method with each member of the set.
...
(3) You can actually call the update() method with any number of arguments...
(4) The update() method can take objects of a number of different datatypes, including lists. When called with a list, the update() method adds all the items of the list to the original set.

It's not a huge deal, as immediately upon reading (3) and (4), you update your mental definition of update() from (1). That said, (1) is either incorrect or something else is meant, such as:

In this example, update() is passed one argument, a set, and adds...

Namely, (1) is describing the specific code in the example; it's just one way update() can be used, and happens to be passing one set. In contrast, it's not that the arguments to update() can only be of type set (not true) or that it can only take one argument (also not true).

Thanks for taking a look!

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

No branches or pull requests

1 participant