NEPattern
(Not-Enough-Pattern
) ๆฏไธไธช้ซๆ็่ด่ดฃ็ฑปๅ้ช่ฏไธ็ฑปๅ่ฝฌๆข็ๅบ๏ผ็ฌ็ซ่ช Alconna
from nepattern import Pattern
pat = Pattern(str).accept(int).convert(lambda _, x: str(x))
assert pat.execute(13).success
assert pat.execute(42).value() == '42'
assert not pat << 13.0
- ้ซๆ็็ฑปๅ่ฝฌๅๅ่ฝ
- ๅค็ง้ข็ฝฎ็ๅฎไพ
- ่ฏๅฅฝ็ typing ๆฏๆ
- ่ช็ฑ็็ฏๅขๆงๅถ