PEP 313 - Roman numeral literals

Dan Bishop danb_83 at yahoo.com
Tue Apr 1 17:10:53 EST 2003


Mike Meyer <mwm at mired.org> wrote in message news:<x7y92uhzpw.fsf at guru.mired.org>...
> PEP: 313
> Title: Adding Roman Numeral Literals to Python
[major snippage]

Not a bad idea.  I frequently do date calculations with copyright
dates and Super Bowl numbers, only to have to go through the hassle of
converting to Arabic numerals.  This PEP will save me a lot of time.

Speaking of time, it would also be nice to have sexagesimal literals
so we could could more easily write mixed hours-minutes-seconds
values.  For example, the literal 0s123456 would have the value 12 *
3600 + 24 * 60 + 56, or 45296.  Or, considering the intended
application, perhaps datetime.timedelta(0, 45296) would be better.




More information about the Python-list mailing list