This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
A "Roman" object is stored in the computer as a binary integer,
but it is displayed in Roman numerals.
(In technical terms, it is a subset of the built-in class int,
with a _str_() method which returns a Roman numeral string.)
[see PEP 313 for the inspiration]

This module has .toRoman() and .fromRoman() methods compatible with Mark Pilgrim's roman.py module, but has a larger range, a more forgiving parser, and allows construction of first class Roman objects.

Roman objects act very much like the built-in Decimal objects in Python,
they can be added, subtracted, multiplied, or divided and the result will be
another object of the same class.

So a programmer can say:

>>>import romanclass as roman

>>>two = roman.Roman(2)

>>>five = roman.Roman('V')

>>>print (two+five)

and the computer will print:

VII

This module uses unicode characters to support numbers in the range 0<=n<600000,
and has an optional .toUnicodeRoman() method which will output true unicode
character points for I V X L C D M (rather than their look-alike ASCII values)
and will output the points for I thru XII as single unicode code points.

The .toRoman() method [and the str() function] will output ASCII compatible
strings for values <= 3999.

The string "Nulla" [Latin for "nothing"] will be output for a zero value.

Out of range values will raise romanclass.OutOfRangeError

Badly formatted Roman numeral input strings will raise romanclass.InvalidRomanNumeralError in .fromRoman() or when initializing a Roman object.

CaesarCalc.py, A simple four-function Roman calculator is included as a test/demo.
Release History

Release History

1.0.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
romanclass-1.0.1.zip (105.2 kB) Copy SHA256 Checksum SHA256 Source Aug 12, 2010

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting