Message293291
There is a code example about the set type found under:
https://docs.python.org/3/tutorial/datastructures.html
It reads as:
```
>>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'}
>>> print(basket) # show that duplicates have been removed
{'orange', 'banana', 'pear', 'apple'}
>>> 'orange' in basket # fast membership testing
True
>>> 'crabgrass' in basket
False
>>> # Demonstrate set operations on unique letters from two words
...
>>> a = set('abracadabra')
>>> b = set('alacazam')
>>> a # unique letters in a
{'a', 'r', 'b', 'c', 'd'}
>>> a - b # letters in a but not in b
{'r', 'd', 'b'}
>>> a | b # letters in either a or b
```
I read "either a or b" as "a .EXOR. b". Shouldn't it be:
```
>>> a | b # letters in a or b
```
I don't speak English as a native language, so perhaps I am wrong. |
|
Date |
User |
Action |
Args |
2017-05-09 08:47:27 | mcocdawc | set | recipients:
+ mcocdawc, docs@python |
2017-05-09 08:47:27 | mcocdawc | set | messageid: <1494319647.07.0.625979333092.issue30312@psf.upfronthosting.co.za> |
2017-05-09 08:47:26 | mcocdawc | link | issue30312 messages |
2017-05-09 08:47:26 | mcocdawc | create | |
|