properly.
I have a class that represents physical scalars with units. If I type
I should get something like this:>>3 * s + 4 * m
scalar.Inconsis tentUnits: 3 s, 4 m
to show that seconds cannot be added to meters. Instead, the message
is broken up into individual characters, like this:
scalar.Inconsis tentUnits: ('3', ' ', 's', ',', ' ', '4', ' ', 'm')
This worked correctly for months, so I don't understand what went
wrong. I am using version 2.5.1 on a Dell workstation with Red Hat
Enterprise WS Linux.
As far as I can tell, I am doing everything "by the book." Here is my
exception class:
class InconsistentUni ts(Exception):
def __init__(self, args=""): self.args = args
and here is my instantiation of it:
raise scalar.Inconsis tentUnits, str(self) + ", " + str(other)
I've tried various little changes, but nothing seems to make any
difference. Has anyone else noticed this sort of behavior? Thanks.
By the way, my scalar class is available for free from http://RussP.us/scalar.htm
.. A complete user guide is available. Check it out. I think you'll
like it.