On May 4, 2008, at 7:02 AM, Binger David wrote:
>
>
> The problem is that replace (like strip and slice) can
> break entities.
>
> w.replace(';', '.').
I have to agree with your reasoning. I just wish there was a more
obvious way to help folks (me) from shooting themselves in the foot.
Double h8.quoteing like I ran into can be tricky to track down.
The only thing I can think of is maybe a "strict" flag in qpy to tell
the h8 type to throw exceptions if it is operated on with something
that is not h8 - which should put a stop to implicit quoting of non-
constants. I suppose though that would make the code more verbose as
all quoting of non-constants would become explicit (lots of h8.quote
calls).
On the other hand, maybe quoting of a non-constant is better off being
explicit in the code....
Dave