3 ms·
I understood "unbounded polymorphism" to mean that for a given variable, it took on values whose types do not follow any structural rules. Your example with fil
by scott_s 10y ago
I understood "unbounded polymorphism" to mean that for a given variable, it took on values whose types do not follow any structural rules. Your example with file objects and StringIO objects would not fall in that category, because their relationship could be modeled with single inheritance. (One from the other; both from a parent; both implementing an interface.) Nor would 'len(s)' be unbounded, because 'len' could be modeled as parametric polymorphism.