Proposing __parse__: a standard inverse of __str__
Python standardizes T → str via __str__, but it does not for the partial inverse str ⇀ T. Given a type and a string, nothing in the standard enables introspection whether the type offers string parsing or how to invoke it. A few constructors oblige,…