This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
def downcast(obj, cls):
|
||||
"""Downcast (specialize/narrow) object obj to child type cls"""
|
||||
obj_cls = type(obj)
|
||||
@@ -26,7 +25,7 @@ def _cast(obj, cls):
|
||||
|
||||
|
||||
|
||||
|
||||
'''
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -94,6 +93,6 @@ if __name__ == "__main__":
|
||||
assert ss.methB() == 1
|
||||
assert not hasattr(ss, "methS")
|
||||
assert not hasattr(ss, "methSS")
|
||||
|
||||
'''
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user