At the moment, each value type is different.
We have a method Component.decoded() which puts an incomplete if/else dispatch into place to get the decoded value.
It would be easier if all value types had a property such as ical_value which would result in the object used.
Examples
This would e.g. be
.td for timedelta
.dt for date
str(self) for vText
Places to edit
Classes to add ical_value to:
Other places to touch when the list above is done:
Checklist for all ical_value
For each of the added functions:
Note: Corrected: it should be ical_value for consistency with to_ical and from_ical.
At the moment, each value type is different.
We have a method
Component.decoded()which puts an incomplete if/else dispatch into place to get the decoded value.It would be easier if all value types had a property such as
ical_valuewhich would result in the object used.Examples
This would e.g. be
.tdfor timedelta.dtfor datestr(self)for vTextPlaces to edit
Classes to add
ical_valueto:vWeekday.ical_valuefor theComponent.decoded()polymorphy #1360Other places to touch when the list above is done:
Component.decoded()usesical_valueand nothing else (Polymorphy)Component.decoded()Component.decoded()works, so that new value types are easy to implement.Checklist for all
ical_valueFor each of the added functions:
ical_valueNote: Corrected: it should be
ical_valuefor consistency withto_icalandfrom_ical.