Skip to main content

literal

Function literal 

pub(super) fn literal(default: &str, dotted: &str) -> Result<String, Error>
Expand description

Accepts a default only if it is a plain Python literal or the stub placeholder.

... is accepted when PyO3 renders an opaque Rust-expression default; the committed stub can then use Python’s standard placeholder without copying a Rust constant. Other non-literals (including an address-bearing object repr) fail closed because they would make generated output unreproducible.