Skip to content
Snippets Groups Projects
  • Enric Tejedor Saavedra's avatar
    bc09ba26
    [Exp PyROOT] Implement TObject __eq__ and __ne__ in C++ · bc09ba26
    Enric Tejedor Saavedra authored
    The equality and inequality operators are better implemented in C++,
    since we need to need to rely on Cppyy's rich comparison if the object
    we are comparing ourselves with is not a Python proxy or if it contains
    a null pointer. For example, we need to support the comparison to None.
    
    The rest of comparison operators (i.e. those that define order)
    can be implemented in Python, throwing a NotImplemented exception
    if we are not comparing two proxies to TObject or derivate.
    bc09ba26
    History
    [Exp PyROOT] Implement TObject __eq__ and __ne__ in C++
    Enric Tejedor Saavedra authored
    The equality and inequality operators are better implemented in C++,
    since we need to need to rely on Cppyy's rich comparison if the object
    we are comparing ourselves with is not a Python proxy or if it contains
    a null pointer. For example, we need to support the comparison to None.
    
    The rest of comparison operators (i.e. those that define order)
    can be implemented in Python, throwing a NotImplemented exception
    if we are not comparing two proxies to TObject or derivate.