Python Example 想见你 want to see you

Python day 21:

想见你 (Someday or One day) is one of the most popular and highly-rated dramas on Douban 2019 data. But i did not understand the story timeline because it involved a time-traveling element. My brain was burned, after watching some youtube explaining, I still didn’t get the story.
But I decide to make a python class to show the timeline. 

Key Concept:

Implicit:  pass a well-defined function from the parent class to the child class.

Override: replace a parent function in order to carry different behavior.

Alter: compare the different behaviors before or after the parent class version.


Someday or One Day timeline Python Code:

class want2cu(object):
    def override(self):
        print("2019-want to see you, i only want to see u")
    def implicit(self):
        print("2019-past, now, future, i only want 2cu")
    def altered(self):
        print("2019-not in the same dimension")
class memory(want2cu):
    def override(self):
        print ("2012-happy together")
    def altered(self):
        print("2019-last dance")
        super(memory, self).altered()
        print("they see each other in 2012 and 2019 ???? ^_^!")


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Social media & sharing icons powered by UltimatelySocial
%d bloggers like this: