Create mobject.py

This commit is contained in:
Bill Xi 2021-10-31 20:02:30 +08:00 committed by GitHub
parent b531c82bc4
commit 01f4ef3e5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1595,7 +1595,9 @@ class Group(Mobject):
raise Exception("All submobjects must be of type Mobject")
Mobject.__init__(self, **kwargs)
self.add(*mobjects)
def __add__(self, other : 'Mobject' or 'Group'):
assert(isinstance(other(Mobject))
return self.add(other)