[docs] A documentation glitch
Georg Brandl
georg at python.org
Fri May 21 22:45:21 CEST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 13.05.2010 14:14, schrieb Денис Горбачев:
> Page in question:
> http://docs.python.org/py3k/tutorial/datastructures.html#sets
>
>>>> fruit = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
>
>
>
>>>> fruit = set(basket) # create a set without duplicates
>
>
> Should be
>
>>>> fruit = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
>
>
>
>>>> fruit = set(*fruit*) # create a set without duplicates
>
>
> as the intention is to show how to create a set without duplicates from a list.
Dear Denis,
Thanks for the report, that example should now be clearer.
regards,
Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
iEYEARECAAYFAkv28OAACgkQN9GcIYhpnLCMqgCdGaNrMuOKhKsF4gLGLyg+0gCA
J+kAoInYQAj7daNFzDdYlmIqVuI8sHfp
=4PK+
-----END PGP SIGNATURE-----
More information about the docs
mailing list