Re:Static types in Python
by clusmore on Thursday October 13, 2016 @09:13PM
(#12705528)
Yeah but as I said it can still go far more general than just int, float and complex. It could be any arbitrary class defined by somebody else that I could not possibly know about at design time, and so a whitelisting approach of concrete classes is simply not going to cut it. It would be nice to have a way to describe the actual requirements (only that the elements support __add__ and __radd__).
[ Parent
| on HN ]