Selection
=========

.. currentmodule:: penzai.core.selectors

.. autoclass:: Selection
  :members:
  :special-members:
  :show-inheritance:


  
  
    
    

  

  
  
  
  
  
  
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

  
  .. rubric:: Methods
  .. autosummary::
  
    
    ~Selection.__init__
    
    
    ~Selection.apply
    
    
    ~Selection.apply_and_inline
    
    
    ~Selection.apply_with_selected_index
    
    
    ~Selection.assert_count_is
    
    
    ~Selection.at
    
    
    ~Selection.at_childless
    
    
    ~Selection.at_children
    
    
    ~Selection.at_equal_to
    
    
    ~Selection.at_instances_of
    
    
    ~Selection.at_keypaths
    
    
    ~Selection.at_pytree_leaves
    
    
    ~Selection.at_subtrees_where
    
    
    
    ~Selection.count
    
    
    ~Selection.deselect
    
    
    ~Selection.flatten_selected_selections
    
    
    
    ~Selection.get
    
    
    ~Selection.get_by_path
    
    
    ~Selection.get_keypaths
    
    
    ~Selection.get_sequence
    
    
    ~Selection.insert_after
    
    
    ~Selection.insert_before
    
    
    ~Selection.invert
    
    
    ~Selection.is_empty
    
    
    
    ~Selection.partition
    
    
    ~Selection.pick_nth_selected
    
    
    ~Selection.refine
    
    
    ~Selection.remove_from_parent
    
    
    
    ~Selection.select_and_set_by_path
    
    
    ~Selection.set
    
    
    ~Selection.set_by_path
    
    
    ~Selection.set_sequence
    
    
    ~Selection.show_selection
    
    
    ~Selection.show_value
    
    
    
    
    
    
    ~Selection.where
    
  

  
  .. rubric:: Attributes
  .. autosummary::
  
    ~Selection.selected_by_path
    ~Selection.remainder
  

  

  .. rubric:: Inherited Methods
  .. raw:: html

    <details style="margin-bottom: 1.5rem">
      <summary style="font-style:italic">(expand to view inherited methods)</summary>

  .. autosummary::
  
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    ~Selection.attributes_dict
    
    
    
    
    
    ~Selection.from_attributes
    
    
    
    
    
    
    
    
    
    
    ~Selection.key_for_field
    
    
    
    
    
    
    ~Selection.select
    
    
    
    
    
    
    
    
    ~Selection.tree_flatten
    
    
    ~Selection.tree_flatten_with_keys
    
    
    ~Selection.tree_unflatten
    
    
    ~Selection.treescope_color
    
    

  .. raw:: html

    </details>

  