pasta icon indicating copy to clipboard operation
pasta copied to clipboard

Make Token optional in Python bindings

Open pgoodman opened this issue 2 years ago • 0 comments

Some APIs return std::optional<Token> and others return Token knowing that they will be nullable-ish. In the Python bindings, we should specialize nanobind::type_caster<std::optional<::pasta::Token>> and nanobind::type_caster<::pasta::Token> to present both as Optional[Token].

pgoodman avatar Sep 16 '23 23:09 pgoodman