Bug in htmlentitydefs.py with Python 3.0?
"Martin v. Löwis"
martin at v.loewis.de
Thu Dec 27 13:19:21 EST 2007
>> I would not write it this way, but as
>>
>> for name,codepoint in htmlentitydefs.name2codepoint:
>> entity_map[name] = unichr(codepoint)
>
> has dictionary iteration changed in 3.0? if not, your code doesn't
> quite work.
Right - I forgot to add .items().
> and even if you fix that, it doesn't work for all Python
> versions that ET works for...
That's true. However, the OP seemed to care only about Python 3.0
initially.
Regards,
Martin
More information about the Python-list
mailing list