Skip to content
  • Francis Herne's avatar
    Fix ExtSlice crash with Python <= 3.8 · 172dc513
    Francis Herne authored
    BUG: 426292
    FIXED-IN: 5.6.1
    
    The dimensions of an ExtSlice node are _slice nodes rather than _expr,
     so this would crash whenever encountering one.
    
     --
    
    This was introduced in commit 05e95cac "Initial support for CPython 3.9".
    
    When I replaced `SliceAst` with `ExpressionAst` in the relevant line
     of python39.sdef, conversionGenerator.py *also* changed `_slice` to `_expr` here
     (because the type used is implicitly determined in a stupid way)
     and I failed to notice that difference in the newly-generated code.
    
    I couldn't see an easy way to fix the implicit type thing, so this commit just
     bypasses that mechanism and uses CODE instead.
    172dc513