[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH 1/3] Create Size class for specifying device and fs sizes.



On Tue, Sep 07, 2010 at 11:13:30AM -0400, Chris Lumens wrote:
> > +class Size:
> 
> You need to inherit from object, since you use a property later.
> 
> Overall this is off to a really good start, but I'd like the class to
> act more like a number.  That is, I'd like to see all the __lt__,
> __eq__, __add__, etc. methods added.  I bet that would get rid of a lot
> of silly stuff we're doing right now.

It should be a subclass of Decimal, which already has what we need to
act like a real number in most cases.

The human readable conversion seems a bit clunky. But I don't have any
suggestions at the moment.

Also, we are probably going to want to translate the units and handle
singular/plural in a translatable way.

-- 
Brian C. Lane / Anaconda Team
Port Orchard, WA (PST8PDT)

Attachment: pgpzPSI3bGUsb.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]