Skip to content

Commit 67160e9

Browse files
committed
update readme
1 parent 56a98f0 commit 67160e9

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

README.rst

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,10 @@ Use ``.get(value, default=None)`` method to receive ``default`` if ``value`` is
234234

235235
.. code:: python
236236
237-
Colors.get(Colors.RED) == Colors.RED
238-
Colors.get('#f00') == Colors.RED
239-
Colors.get('undefined_color') is None
240-
Colors.get('undefined_color', Colors.RED) == Colors.RED
237+
assert Colors.get(Colors.RED) == Colors.RED
238+
assert Colors.get('#f00') == Colors.RED
239+
assert Colors.get('undefined_color') is None
240+
assert Colors.get('undefined_color', Colors.RED) == Colors.RED
241241
242242
Compatibility
243243
-------------
@@ -272,6 +272,15 @@ There's also optimistic casting of inner types:
272272
assert str(HttpStatuses.BAD_REQUEST) == "400"
273273
274274
275+
Check membership:
276+
277+
.. code:: python
278+
279+
assert HttpStatuses.OK in HttpStatuses
280+
assert 200 in HttpStatuses
281+
assert 999 not in HttpStatuses
282+
283+
275284
JSON
276285
....
277286

0 commit comments

Comments
 (0)