MCPcopy Index your code
hub / github.com/RustPython/RustPython / _count_elements

Function _count_elements

Lib/collections/__init__.py:541–545  ·  view source on GitHub ↗

Tally elements from the iterable.

(mapping, iterable)

Source from the content-addressed store, hash-verified

539########################################################################
540
541def _count_elements(mapping, iterable):
542 'Tally elements from the iterable.'
543 mapping_get = mapping.get
544 for elem in iterable:
545 mapping[elem] = mapping_get(elem, 0) + 1
546
547try: # Load C helper function if available
548 from _collections import _count_elements

Callers 2

test_helper_functionMethod · 0.90
updateMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_helper_functionMethod · 0.72