by turbopython · 1mo ago · 0 comments
@cpp_template("::tpy::min_key({0}, {1}, {2})", borrows=("a", "b"))
def min[T, K: Comparable](a: T, b: T, key: Fn[[T], K]) -> T: ...
(the result may borrow either a or b)Current approach is to warn because the checks are less precise than what I'd like them to. The idea is to keep it that way for now, migrate to CFG in the future and enable it in a strict mode.
No comments yet.