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
recordtype and namedlist are like collections.namedtuple but provides for default values, which are currently used by hgvs.
Another subtle distinction is namedtuple subclasses serialize differently on 2.7 and 3.5, whereas namedlist is consistent.
Consider using namedlist for portability, but drop the use of defaults so that we can swap it out for namedtuple when we're on 3.5 only.
No experience with attrs, but appears to have some nice technical advantages (e.g., optional type checking, optional slot use, creates standard class rather than using class factory).
Originally reported by: Reece Hart (Bitbucket: reece, GitHub: reece)
Related to: #178, #301
Switch-out the long-deprecated recordtype module.
Option 1: collections.namedtuple
Option 2: namedlist, the successor to recordtype.
Option 3: attrs
recordtype and namedlist are like collections.namedtuple but provides for default values, which are currently used by hgvs.
Another subtle distinction is namedtuple subclasses serialize differently on 2.7 and 3.5, whereas namedlist is consistent.
Consider using namedlist for portability, but drop the use of defaults so that we can swap it out for namedtuple when we're on 3.5 only.
No experience with attrs, but appears to have some nice technical advantages (e.g., optional type checking, optional slot use, creates standard class rather than using class factory).
The text was updated successfully, but these errors were encountered: