Statements (52)
Predicate | Object |
---|---|
gptkbp:instanceOf |
gptkb:architecture
|
gptkbp:alternativeName |
dict
|
gptkbp:canBeNested |
True
|
gptkbp:compatibleWith |
duplicate keys
unhashable keys |
gptkbp:comprehensionSyntax |
{k: v for k, v in iterable}
|
gptkbp:createdBy |
curly braces {}
dict() constructor |
gptkbp:defaultIn |
None (if key not found and using get())
|
gptkbp:differenceFromList |
unordered mapping vs ordered sequence
|
gptkbp:differenceFromSet |
key-value pairs vs unique values
|
gptkbp:differenceFromTuple |
mutable mapping vs immutable sequence
|
gptkbp:hashFunction |
used for key lookup
|
gptkbp:hasMethod |
clear()
get() keys() values() update() items() pop() popitem() setdefault() |
https://www.w3.org/2000/01/rdf-schema#label |
Python dictionaries
|
gptkbp:introducedIn |
Python 1.0
|
gptkbp:iterable |
True
|
gptkbp:keysMustBe |
immutable types
|
gptkbp:mutable |
True
|
gptkbp:numberOfLocations |
key-value pairs
|
gptkbp:order |
True (since Python 3.7)
|
gptkbp:period |
average O(1)
|
gptkbp:serialization |
can be serialized with JSON if keys are strings
|
gptkbp:supportsCopy |
copy() method
|
gptkbp:supportsDeletion |
del statement
|
gptkbp:usedFor |
mapping data
fast lookup counting occurrences implementing caches storing configuration |
gptkbp:usedIn |
gptkb:machine_learning
gptkb:transformation gptkb:Python_programming_language data analysis web development caching APIs parsing JSON objects config files object representation |
gptkbp:valuesCanBe |
any type
|
gptkbp:bfsParent |
gptkb:pandas_DataFrames
|
gptkbp:bfsLayer |
7
|