We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f874926 commit f9a494eCopy full SHA for f9a494e
calendra/holiday.py
@@ -51,10 +51,9 @@ def __iter__(self):
51
tp = self, self.name
52
return iter(tp)
53
54
- def replace(self, *args, **kwargs):
55
- replaced = super().replace(*args, **kwargs)
56
- vars(replaced).update(vars(self))
57
- return replaced
+ def replace(self, **kwargs):
+ orig = date(self.year, self.month, self.day)
+ return Holiday(orig.replace(**kwargs), **vars(self))
58
59
def __add__(self, other):
60
orig = date(self.year, self.month, self.day)
newsfragments/31.bugfix.rst
@@ -0,0 +1 @@
1
+Re-implement the logic of replace.
0 commit comments