
Sept. 4, 2004
4:25 p.m.
On Fri, 2004-09-03 at 16:37, M.-A. Lemburg wrote:
I think Barry needs some backup here.
Thanks MAL! I'll point out that Template was very deliberately subclassed from unicode, so Template instances /are/ unicode objects. From the standpoint of type conversion, using /F's notation, T(8) == U, thus because U % 8 == U, T(8) % 8 == U. Other than .encode() are there any other methods of unicode objects that return 8bit strings? I don't think so, so it seems completely natural that T % 8 returns U. Raymond is against the class-based implementation of PEP 292, but if you accept the class implementation of 292 (which I still believe is the right choice), then the fact that the mod operator always returns a unicode makes perfect sense. -Barry