3 ms·
I find type hinting to be very useful, but it has some gotchas (also present in unhinted Python), where the type you get isn't the type you expect: - Int and f
by jimbo1qaz 8y ago
I find type hinting to be very useful, but it has some gotchas (also present in unhinted Python), where the type you get isn't the type you expect:
- Int and float from numpy arrays are np.int/float32/64. And round(np.floatXX) returns a float, but round(float) returns an int in Python 3.
- ruamel.yaml loads CommentedMap and some custom scalar types. CommentedMap is not a subclass of dict.