On 02/14/2020 02:24 PM, Soni L. wrote:
class Foo(Trait): def x(self): raise NotImplementedError
class Bar(Trait): def x(self): raise NotImplementedError
class Baz(TraitObject): # "mirrors" class Baz(object): @impl(Foo) class Foo: def x(self): pass @impl(Bar) class Bar: def x(self): pass
That looks like a lot of extra boiler-plate to me (aka busy-work, aka anti-Python).
Can you give us a real example using real code? You say you've made a library -- show us the library being used in real life -- foo, bar, and baz is not explaining anything, particularly for those of us who have no knowledge of Rust, nor the time/desire to go learn it.