xrudelis/pytrait
View on GitHub ↗ ★ 144 Python
Traits for Python3
3 mentions on Hacker News by 3 people: 1 story, 2 comments · first 2021-11-21 · latest 2021-11-21
20082026
-
Some pretty horrible string / 'registry' metaclass hackery: https://github.com/xrudelis/pytrait/blob/master/pytrait/impl...
comment by aldanor · 2021-11-21 · in Show HN: Rust-Like Traits in Python -
I don't understand how this works: https://github.com/xrudelis/pytrait/blob/master/examples/bas... The "Sheep" class never inherits from "Animal" or "ImplAnimalForSheep", nor does its body reference them in any way, so how does it get the…
comment by _dain_ · 2021-11-21 · in Show HN: Rust-Like Traits in Python -
▲ 50
Show HN: Rust-Like Traits in Pythonstory by xrudelis · 2021-11-21 · 21 comments