Note that the ordering is already an attribute of the PersonSearchParams class, inherited from the base SearchParams class. The question is whether its default value should be defined there or in the PersonSet. One of the considerations is that the SearchParams subclasses are currently implemented as empty containers to be filled at run time with search parameters, kinda like the Data Transfer Object pattern. I'm afraid that starting to define default values there may break the pattern, like when using the PersonSearchParams class in a context unrelated to the web interface for example.
As precedent, consider looking into the BugTaskSearchParams class in Launchpad. It is also defined similarly to the SearchParams class with empty attributes. The default value for ordering is defined elsewhere in the keyword argument to the fromSearchForm method.
Note that the ordering is already an attribute of the PersonSearchParams class, inherited from the base SearchParams class. The question is whether its default value should be defined there or in the PersonSet. One of the considerations is that the SearchParams subclasses are currently implemented as empty containers to be filled at run time with search parameters, kinda like the Data Transfer Object pattern. I'm afraid that starting to define default values there may break the pattern, like when using the PersonSearchParams class in a context unrelated to the web interface for example.
As precedent, consider looking into the BugTaskSearchParams class in Launchpad. It is also defined similarly to the SearchParams class with empty attributes. The default value for ordering is defined elsewhere in the keyword argument to the fromSearchForm method.