♥♥
鬱
鬱
Press ENTER or type command to continue
# -*- coding:utf-8 -*- | |
BROKEN_HEART = "鬱" | |
class Person(object): | |
def __mul__(self, other): | |
if not isinstance(other, Person): | |
return BROKEN_HEART | |
return "♥♥" | |
def __rmul__(self, other): | |
if not isinstance(other, Person): | |
return BROKEN_HEART | |
return None | |
def main(): | |
drillbits, pasberth = Person(), Person() | |
print(drillbits * pasberth) | |
feiz = Person() | |
print(feiz * None) | |
print(0 * feiz) | |
if __name__ == "__main__": | |
main() |