Dan Sommers wrote:
> On 18 Feb 2005 01:25:06 -0800,
> "Serge Orlov" <[EMAIL PROTECTED]> wrote:
>
>> Dan Sommers wrote:
>
>>> So my question is: Is there a way to pass options "through" a
>>> format string to the __str__ and __repr__ functions? For example,
>>> can I define my own alternate form f
On 18 Feb 2005 01:25:06 -0800,
"Serge Orlov" <[EMAIL PROTECTED]> wrote:
> Dan Sommers wrote:
>> So my question is: Is there a way to pass options "through" a format
>> string to the __str__ and __repr__ functions? For example, can I
>> define my own alternate form for use with the '#' formattin
Dan Sommers wrote:
> So my question is: Is there a way to pass options "through" a format
> string to the __str__ and __repr__ functions? For example, can I
> define my own alternate form for use with the '#' formatting
> character, so that '%#s' generates output according to SI guidelines?
Yo
Hi,
I have a class whose objects represent physical quantities including
uncertainties and units, and I would like more control over the way they
print.
I have a __str__ method which outputs the quantity and its uncertainty,
properly rounded (i.e. the uncertainty to one digit and the quantity to