You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
load_afq_data already returns a tuple with up to 8 elements. Depending on how we resolve #78, this might climb up to 9 elements. This is too much and I often forget the order of the results. How should we simplify the returned result:
Return a dict with keys X, subjects, groups, etc.
Return a namedtuple. See os.stat for an example implementation from the standard library.
Leave load_afq_data as is but also provide an AFQDataLoader class with attributes for each return value.
I'm partial to the namedtuple since it can be unpacked like a regular tuple so it would be backwards compatible. But we could also access the fields by name, much like a class instance's attributes. Kind of the best of both.
load_afq_data
already returns a tuple with up to 8 elements. Depending on how we resolve #78, this might climb up to 9 elements. This is too much and I often forget the order of the results. How should we simplify the returned result:X
,subjects
,groups
, etc.os.stat
for an example implementation from the standard library.load_afq_data
as is but also provide anAFQDataLoader
class with attributes for each return value.I'm partial to the namedtuple since it can be unpacked like a regular tuple so it would be backwards compatible. But we could also access the fields by name, much like a class instance's attributes. Kind of the best of both.
@arokem WDYT?
The text was updated successfully, but these errors were encountered: