term.atom

Erlang atoms: Atom and StrictAtom.

class term.atom.Atom

Bases: str, BaseTerm

An Erlang atom: a str that encodes back to an atom.

It is equal to, and hashes like, the string of the same text, so as a dict key the two are one key: {Atom('foo'): 1, 'foo': 2} is {'foo': 2}.

static from_string_or_atom(s)

Create an Atom from a string or return unchanged if it was an atom.

class term.atom.StrictAtom

Bases: Atom

An atom that hashes differently from the string of the same text, so that a dict can hold both as keys: {StrictAtom('foo'): 1, 'foo': 2} has two entries. It still compares equal to the string.