• Kirill Smelkov's avatar
    cxx: Correct dict interface · 58fcdd87
    Kirill Smelkov authored
    Package cxx was added in 9785f2d3 (cxx: New package), but the interface
    that cxx:dict provided turned out to be not optimal:
    
        dict.get  was returning (v, ok), and
        dict.pop  ----//---
    
    Correct dict.get and dict.pop to return just value, and, similarly to
    channels API, provide additional dict.get_ and dict.pop_ - extended
    versions that also return ok:
    
        dict.get(k)  -> v
        dict.pop(k)  -> v
        dict.get_(k) -> (v, ok)
        dict.pop_(k) -> (v, ok)
    
    This time add tests.
    58fcdd87
cxx.pxd 1.38 KB