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

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

 



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: pgpbVz0v2CO2m.pgp
Description: PGP signature

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux