Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Python

Idiom #331 Clear map

Remove all entries from the map m.

Explain if other references to the same map now see an empty map as well.

m.clear()

m is a dict.

All references to this dict now see an empty dict.
m.Clear();

All references see it's empty.

New implementation...
< >
programming-idioms.org