-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
compilerenhancementNew feature or requestNew feature or requestusabilityThis ticket is related to improved usabilityThis ticket is related to improved usability
Description
Consider the following model
std::print(std::template("/ip.j2", net="192.168.0.0/24"))
and the following template:
{{ net | std.ipindex(1, keep_prefix=true) }}
The compiler will fail with the given exception:
TypeError: _get_template_engine.<locals>.curywrapper.<locals>.safewrapper() got an unexpected keyword argument 'keep_prefix'
It should be possible to call these plugins this way. The config module already does it, this is a workaround to the original model:
std::print(config::get_template_value_as_string({"path": "template:///ip.j2}", "path", net="192.168.0.0/24"))
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
compilerenhancementNew feature or requestNew feature or requestusabilityThis ticket is related to improved usabilityThis ticket is related to improved usability