rrule attribute names

Bug #943509 reported by James Emerton on 2012-02-29
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dateutil
Undecided
Unassigned

Bug Description

I would like to propose that the rrule object attributes that contain the rule specification (_freq, _bymonth, _byweekday, etc...) drop the underscore prefix and become a part of the public interface.

Rationale:

I am building a user interface for the creation/editing of RRULEs. I would like to start with an RRULE string, populate the UI, and ultimately convert the UI contents back into an RRULE string. (I'd also like a __str__() method, but that is a separate ticket.)

James Emerton (james-2qie2h1nj) wrote :

Upon further consideration, access to these fields may best be provided via a property descriptor; allowing clients to mutate the values requires invalidating the cache.

James Emerton (james-2qie2h1nj) wrote :

The attached patch adds property descriptors for RRULE components.

James Emerton (james-2qie2h1nj) wrote :

The updated patch addresses some issues accessing byhour, byminute, and bysecond when those components were unspecified in the original rule.

When an rrule component is synthesized from the dtstart, we are setting an _ignore attribute on the object so that the corresponding property accessor does not return the synthesized component.

any news on this?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers