MCPcopy Create free account
hub / github.com/dateutil/dateutil / replace

Method replace

src/dateutil/rrule.py:777–789  ·  view source on GitHub ↗

Return new rrule with same attributes except for those attributes given new values by whichever keyword arguments are specified.

(self, **kwargs)

Source from the content-addressed store, hash-verified

775 return '\n'.join(output)
776
777 def replace(self, **kwargs):
778 """Return new rrule with same attributes except for those attributes given new
779 values by whichever keyword arguments are specified."""
780 new_kwargs = {"interval": self._interval,
781 "count": self._count,
782 "dtstart": self._dtstart,
783 "freq": self._freq,
784 "until": self._until,
785 "wkst": self._wkst,
786 "cache": False if self._cache is None else True }
787 new_kwargs.update(self._original_rule)
788 new_kwargs.update(kwargs)
789 return rrule(**new_kwargs)
790
791 def _iter(self):
792 year, month, day, hour, minute, second, weekday, yearday, _ = \

Callers 15

default_tzinfoFunction · 0.80
__add__Method · 0.80
__init__Method · 0.80
_parse_date_valueMethod · 0.80
get_tokenMethod · 0.80
parseMethod · 0.80
_build_tzawareMethod · 0.80
_build_naiveMethod · 0.80
_find_compMethod · 0.80
nocacheMethod · 0.80
available_iana_timezonesFunction · 0.80
datetime_existsFunction · 0.80

Calls 1

rruleClass · 0.85

Tested by 15

test_matches_zoneinfoFunction · 0.64
transitionFunction · 0.64
transition_utcMethod · 0.64
wall_transitionMethod · 0.64
test_unambiguousFunction · 0.64
test_gaps_and_foldsFunction · 0.64
_one_transitionFunction · 0.64
_one_transition_foldFunction · 0.64