[Python-ideas] Lessons from typing hinting Whoosh (PEP484)
Matt Chaput
matt at whoosh.ca
Mon Nov 16 20:35:04 EST 2015
> Yeah, but I'd still prefer a solution that is only read by the type
> checker. And defining subclasses of int is pretty uncommon, so it'll
> confuse the heck out of a lot of readers -- much more so than other
> parts of type annotations (which are ignorable).
I think a solution that only affected the type system would be much better, but it's cool that subclassing int exists as a workaround (didn't know that would work :). I'll have to decide if it's worth the trouble for me.
Thanks all of you for learning me a thing!
Matt
More information about the Python-ideas
mailing list