• Victor Stinner's avatar
    code_richcompare() now uses the constants types · efb2413c
    Victor Stinner yazdı
    Issue #25843: When compiling code, don't merge constants if they are equal but
    have a different types. For example, "f1, f2 = lambda: 1, lambda: 1.0" is now
    correctly compiled to two different functions: f1() returns 1 (int) and f2()
    returns 1.0 (int), even if 1 and 1.0 are equal.
    
    Add a new _PyCode_ConstantKey() private function.
    efb2413c
code.h 5.13 KB