Is it possible to create an extension method in Python for datetime objects? I.e. I would like to create a date date = datetime.datetime(2022, 2, 2) and use my extension method which will do sth with that date by simply typing date.my_extension(args). Is it possible and if not, what is the best alternative for that?
my_extension(date, args)? What exactly are you trying to achieve? I sense an XY problem.