You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
types.is_type(OrderedMap(), Map) returns false, so it seems that the behavior of is_type is to check literally if the object is of the specified type, rather than whether it's derived from the type (which is the behavior of isinstance in python).
If this is the intended behavior, perhaps there should be some words on this in the doc for is_type.
The text was updated successfully, but these errors were encountered:
Good point! We could change the implementation, but it would only work for Lua class systems where _base always points to the derived type; if m = OrderedMap(), then both OrderedMap:class_of(m) and Map:class_of(m) are true. One approach is to try to resolve the 'class' method class_of.
types.is_type(OrderedMap(), Map)
returns false, so it seems that the behavior ofis_type
is to check literally if the object is of the specified type, rather than whether it's derived from the type (which is the behavior ofisinstance
in python).If this is the intended behavior, perhaps there should be some words on this in the doc for
is_type
.The text was updated successfully, but these errors were encountered: