Closed DeviousStoat closed 1 year ago
@DeviousStoat One thing I realized with the get
is that it supports any object. If the passed in object is not a dict
or list
, then it falls back to using getattr()
on the object.
That also means that anything that is using get
may need to support a non-dict/list argument(s) (e.g. invoke
can invoke a method on any object).
get
is very hard to type but a very nice simple usage of the function is to maybe get a value from a list without worrying about index errors, similarly toget
method fordict
. Since using the function on a list with anint
path is unequivocal, this usage can be typed. This is the goal of this PR.