py2cpp icon indicating copy to clipboard operation
py2cpp copied to clipboard

Compiling functions without type hints

Open jarble opened this issue 2 years ago • 0 comments

Is py2cpp able to compile Python without type hints?

It seems that it would be possible to take a function like this:

def subtract(a,b)
    return a - b

...and generate a C++ function like this, using auto to infer the types:

auto subtract(auto a, auto b){
    return a - b;
}

jarble avatar Sep 19 '21 00:09 jarble