mindee / tawazi

A DAG Scheduler library written in pure python
https://mindee.github.io/tawazi/
Apache License 2.0
70 stars 5 forks source link

Clearer Error when KeyError #157

Open bashirmindee opened 1 year ago

bashirmindee commented 1 year ago

Currently when accessing an index/key that doesn't exist in a given object or if an object is not indexable, the error message is not clear enough. it should mention which object it is referring too. reproduce issue

from tawazi import xn, dag
@xn
def none(): return None
@dag
def pipe(): none()['a']
bashirmindee commented 1 year ago

The error should be clear enough even with multiple indices