Re: meta-class review

2010-10-06 Thread Ethan Furman
Carl Banks wrote: On Oct 5, 4:17 pm, Ethan Furman wrote: class DashInt(int): __metaclass__ = Perpetuate def __str__(x): if x == 0: return '-' return int.__str__(x) Well, it's definitely overkill for printing a dash instead of a zero, but a lot of peopl

Re: meta-class review

2010-10-06 Thread Jorgen Grahn
On Wed, 2010-10-06, Ethan Furman wrote: > MRAB wrote: >> On 06/10/2010 00:17, Ethan Furman wrote: >> > [snip] >> > Any comments appreciated, especially ideas on how to better handle >> > class- and staticmethods >> > >> I think that's a bit of overkill. The problem lies in the printing >> part,

Re: meta-class review

2010-10-06 Thread Carl Banks
On Oct 5, 4:17 pm, Ethan Furman wrote: > On one the many mini-reports we use, we have a bunch of counts that are > frequently zero; because the other counts can also be low, it becomes > easy to miss the non-zero counts.  For example: > > Code  Description > >        Conv Errors              :    

Re: meta-class review

2010-10-05 Thread Ethan Furman
MRAB wrote: On 06/10/2010 00:17, Ethan Furman wrote: > [snip] > Any comments appreciated, especially ideas on how to better handle > class- and staticmethods > I think that's a bit of overkill. The problem lies in the printing part, but you're spreading the solution into the rest of the appli

Re: meta-class review

2010-10-05 Thread MRAB
On 06/10/2010 00:17, Ethan Furman wrote: > On one the many mini-reports we use, we have a bunch of counts that > are frequently zero; because the other counts can also be low, it > becomes easy to miss the non-zero counts. For example: > > Code Description > > Conv Errors :

meta-class review

2010-10-05 Thread Ethan Furman
On one the many mini-reports we use, we have a bunch of counts that are frequently zero; because the other counts can also be low, it becomes easy to miss the non-zero counts. For example: Code Description Conv Errors : 6 31,N DPV Failure : 4 10: