Skip to content

Commit d3af0a1

Browse files
authored
Update core.rst
1 parent 69760ab commit d3af0a1

1 file changed

Lines changed: 0 additions & 23 deletions

File tree

docs/api/core.rst

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -213,29 +213,6 @@ Use the ``parse()`` method to subdivide segments using parser objects:
213213
events = file_segment.traverse_to_rank("event")
214214
print(f"Detected {len(events)} events")
215215
216-
Utilities
217-
---------
218-
219-
_ignored (internal)
220-
^^^^^^^^^^^^^^^^^^^
221-
222-
``_ignored`` is a private context manager used internally to suppress specific
223-
exceptions. It is not part of the public API.
224-
225-
For your own code, use the equivalent pattern from the standard library:
226-
227-
.. code-block:: python
228-
229-
from contextlib import suppress
230-
231-
# Suppress a specific exception
232-
with suppress(KeyError):
233-
value = some_dict["missing_key"]
234-
235-
# Suppress multiple exception types
236-
with suppress(KeyError, AttributeError):
237-
value = obj.missing_attr
238-
239216
.. note::
240217
Segments store references to data arrays, not copies. Modifying the underlying
241218
array affects all segments referencing it.

0 commit comments

Comments
 (0)