In [60]: (1,2) > {1: 2}
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-60-f9d83a4c8f73> in <module>()
----> 1 (1,2) > {1: 2}
TypeError: '>' not supported between instances of 'tuple' and 'dict'I said "modern". Python 2 is not modern. Python 3 is.
And the keyword in my schema validation sentence is "easy".
I love rust, but a low level language cannot be compared in productivity to a high level language for this stuff. They are much, much easier. That's the whole purpose. You trade easiness for rigor.
>>> (1,2) > {1: 2} True
>And dynamic languages excel at that because they make complex declarative schema descriptions easy while powerful.
Marshmallow looks like it works the same way as existing systems in statically types languages. e.g. Serde in Rust:
https://serde.rs/
This validates at compile time.