signum() not in math?
Andy Todd
andy47 at halfcooked.com
Sun Oct 14 20:57:58 EDT 2001
slinkp23 at yahoo.com (Paul Winkler) wrote in
<slrn9sibue.13b.slinkp23 at roaddog.armsnet>:
>On Sat, 13 Oct 2001 06:14:46 -0400, Tim Peters <tim.one at home.com> wrote:
>>I won't find it embarrassing, no; it's more embarrassing that we
>>haven't invented a % format code to convert integers to Roman numerals,
>>which is a more frequent topic on the newsgroup, and wrt support for
>>which Python severely lags behind Common Lisp <wink>.
>
>A format code deserves a wink, but a function or two could be handy --
>I think I'll throw together something with Roman numerals for the ASPN
>cookbook, it doesn't have any.
>
>--Paul Winkler
>
Why not have a look at the work Mark Pilgrim has done in Chapter 6 of
diveintopython (http://diveintopython.org/) This chapter on unit testing
includes a fully functioning roman to decimal and decimal to roman
converters, and they come with extensive unit tests.
You could either use it as a basis for your function or get his permission
to post it to the cookbook.
Regards,
Andy
--
Content free posts a speciality
More information about the Python-list
mailing list