-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
The pattern handling in StrRepr is a bit rubbish, dealing with trivial bases in int, and with no clue about floating-point representations. We should have the ability to derive a %-format from a cohort of strings (just as we do for DateTime) for the Int and Float classes.
The Int detection you already know how to do; Float can be figured out. The tricky bit will be handling __eq__
and __str__
for those patterns. The current base merging is easy enough, but handling 0-prefix and length padding may turn out to be non-trivial, e.g. it needs to know that '%08x' == '%10x'
and that '%08x' + '%10x' == '%08x'
, that '%#x' != '%x'
, etc.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request