New submission from John Marter <[EMAIL PROTECTED]>:

On http://docs.python.org/3.0/tutorial/datastructures.html#sets there is
the following section in the section on sets

>>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'}
>>> print(basket)
{'orange', 'bananna', 'pear', 'apple'}
>>> fruit = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
>>> fruit = set(basket)               # create a set without duplicates
>>> fruit
{'orange', 'pear', 'apple', 'banana'}


The third command should be an assignment to basket rather than fruit.

----------
assignee: georg.brandl
components: Documentation
messages: 77201
nosy: georg.brandl, jmarter
severity: normal
status: open
title: Bad example in set tutorial

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4570>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to