Closed mcoulont closed 1 year ago
I think I can answer my own question. Someone will reopen the issue if needs be.
As patterns are stored in Python dictionaries and as keys/values of dictionaries are not supposed to depend one another, it is normal that it doesn't work.
A workaround to avoid code duplication is:
regexIdentifiant = [A-Z]+
@with_pattern(regexIdentifiant)
def parse_identifiant(text):
return text
regexVidentifiant = "v" + regexIdentifiant
@with_pattern(regexVidentifiant)
def parse_videntifiant(text):
return text
Hello
I define a type and then try to use it to define another type:
I don't understand why this program outputs
although the description of the type
Videntifiant
isv{:Identifiant}
.Thanks for your package by the way