• Kirill Smelkov's avatar
    golang: Expose error at Py level · 17798442
    Kirill Smelkov authored
    The first step to expose errors and error chaining to Python:
    
    - Add pyerror that wraps a pyx/nogil C-level error and is exposed as golang.error at py level.
    - py errors must be compared by ==, not by "is"
    - Add (py) errors.New to create a new error from text.
    - a C-level error that has .Unwrap, is exposed with .Unwrap at py level,
      but full py-level chaining will be implemented in a follow-up patch.
    - py error does not support inheritance yet.
    
    Top-level documentation is TODO.
    17798442
context_test.py 9.53 KB