python/docs/glossary

glossary

dz / python / docs / glossary

Node Tree

Nodes

hashable
content An object is hashable if it has a hash value which never changes during its lifetime (it needs a __hash__() method), and can be compared to other objects (it needs an __eq__() method). Hashable objects which compare equal must have the same hash value.
parents python/docs/stdtypes/set, leetcode/problems/141_linked_list_cycle, leetcode/problems/2352_equal_row_column_pairs
hyperlink https://docs.python.org/3/glossary.html#term-hashable
location knowledge/python.dz:168

generator
content generator: function which returns a generator iterator
children python/docs/reference/expressions/yield (used when defining a generator function), generator_iterator
parents python/docs/stdtypes/generator
hyperlink https://docs.python.org/3/glossary.html#term-generator
location knowledge/python.dz:192

generator_iterator
content Generator Iterator: an object created by a generator. Each yield temporarily suspends processing, remembering the location execution state (including local variables and pending try-statements). When the generator iterator resumes, it picks up where it left off (in contrast to functions which start fresh on every invocation).
children leetcode/problems/872_leaf_similar_trees
parents generator, python/docs/reference/expressions/yield
hyperlink https://docs.python.org/3/glossary.html#term-generator-iterator
location knowledge/python.dz:292

iterable
content Iterable: an object capable of return its members one at a time.
children rust/iter (same concept)
parents python/docs/stdlib/functions/all
hyperlink https://docs.python.org/3/glossary.html#term-iterable
location knowledge/python.dz:336

slice
content slice: An object usually containing a portion of a sequence. A slice is created using the subscript notation, [] with colons between numbers when several are given, such as in variable_name[1:3:5]. The bracket (subscript) notation uses slice objects internally.
parents python/docs/glossary, python/docs/stdtypes/common_sequence_ops, rust/std/slice
hyperlink https://docs.python.org/3/glossary.html#term-slice
location knowledge/python.dz:630