pcaversaccio / snekmate

State-of-the-art, highly opinionated, hyper-optimised, and secure 🐍Vyper smart contract building blocks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

💥 Implement Ternary Operator

pcaversaccio opened this issue · comments

In the new Vyper version 0.3.8, the ternary operator has been implemented (see here):

@external
def hello(a: uint256, b: uint256) -> uint256:
    return a if a < b else b

We should assess the full code base, where a ternary operator could be beneficial.