Skip to content

Commit 1fbb9b5

Browse files
committed
Differentiated emoji examples in about.md doc as well.
1 parent 14f2a2d commit 1fbb9b5

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

β€Žconcepts/sets/about.mdβ€Ž

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -108,19 +108,19 @@ Remember: sets can hold different datatypes and _nested_ datatypes, but all `set
108108

109109
```python
110110
# Attempting to use a list for a set member throws a TypeError
111-
>>> lists_as_elements = {['πŸ˜…','🀣'],
112-
['πŸ˜‚','πŸ™‚','πŸ™ƒ'],
113-
['😜', 'πŸ€ͺ', '😝']}
111+
>>> lists_as_elements = {['🌈','πŸ’¦'],
112+
['☁️','⭐️','🌍'],
113+
['⛡️', '🚲', 'πŸš€']}
114114

115115
Traceback (most recent call last):
116116
File "<stdin>", line 1, in <module>
117117
TypeError: unhashable type: 'list'
118118

119119

120120
# Standard sets are mutable, so they cannot be hashed.
121-
>>> sets_as_elements = {{'πŸ˜…','🀣'},
122-
{'πŸ˜‚','πŸ™‚','πŸ™ƒ'},
123-
{'😜', 'πŸ€ͺ', '😝'}}
121+
>>> sets_as_elements = {{'🌈','πŸ’¦'},
122+
{'☁️','⭐️','🌍'},
123+
{'⛡️', '🚲', 'πŸš€'}}
124124

125125
Traceback (most recent call last):
126126
File "<stdin>", line 1, in <module>
@@ -131,14 +131,15 @@ However, a `set` of `sets` can be created via type `frozenset()`:
131131

132132
```python
133133
# Frozensets don't have a literal form.
134-
>>> set_1 = frozenset({'😜', '😝', 'πŸ€ͺ'})
135-
>>> set_2 = frozenset({'πŸ˜…', '🀣'})
136-
>>> set_3 = frozenset({'πŸ˜‚', 'πŸ™‚', 'πŸ™ƒ'})
134+
>>> set_1 = frozenset({'🌈','πŸ’¦'})
135+
>>> set_2 = frozenset({'☁️','⭐️','🌍'})
136+
>>> set_3 = frozenset({'⛡️', '🚲', 'πŸš€'})
137137

138138
>>> frozen_sets_as_elements = {set_1, set_2, set_3}
139139
>>> frozen_sets_as_elements
140-
{frozenset({'😜', '😝', 'πŸ€ͺ'}), frozenset({'πŸ˜…', '🀣'}),
141-
frozenset({'πŸ˜‚', 'πŸ™‚', 'πŸ™ƒ'})}
140+
{frozenset({'⛡️', 'πŸš€', '🚲'}),
141+
frozenset({'🌈', 'πŸ’¦'}),
142+
frozenset({'☁️', '⭐️', '🌍'})}
142143
```
143144

144145

0 commit comments

Comments
Β (0)