durusmail: quixote-users: Call for help
Call for help
2007-01-21
2007-01-21
Re: Call for help
2007-01-30
2007-01-21
2007-01-30
2007-01-30
2007-01-30
2007-01-30
2007-02-01
2007-02-01
2007-02-01
2007-02-02
2007-02-02
2007-02-02
2007-02-02
2007-02-02
2007-02-03
Re: Call for help
2007-02-06
Re: Call for help
2007-02-05
2007-01-30
Call for help
David Binger
2007-02-02
On Feb 1, 2007, at 7:27 PM, Mike Orr wrote:

> But that in itself is not strictly htmltext's fault.  Maybe the
> previous tests are enough.

None of these are necessarily faults of htmltext, but here
are some other differences.

qpy's h8 and u8 instances can be pickled, and htmltext instances can't.

qpy's h8 and u8 classes don't require a TemplateIO class.
Instead, you just use lists and apply the classmethod h8.from_list().
str(h8(u'\1010'))

 >>> str(htmltext(u'\u1234'))
Traceback (most recent call last):
   File "", line 1, in 
UnicodeEncodeError: 'ascii' codec can't encode character u'\u1234' in
position 0: ordinal not in range(128)
 >>> str(h8(u'\u1234'))
'\xe1\x88\xb4'
(this is the utf8 encoding of \u1234.)

htmltext objects are not iterable.  h8 instances are.

urllib.quote() fails on htmltext instances because they are not
iterable.

The qpy package has some unittests of its own, if anyone is looking
for code that verifies that behavior.







reply