[Python-3000] String comparison

"Martin v. Löwis" martin at v.loewis.de
Fri Jun 8 06:15:51 CEST 2007


> I implemented it for all normalizations in the most straightforward way I
> could think of, which was adding a field to _PyUnicode_DatabaseRecord,
> generating data for it in makeunicodedata.py from
> DerivedNormalizationProps.txt of UCD 4.1, and writing a function
> is_normalized which uses it. The function is called from
> unicodedata_normalized. I made the modifications against py3k-struni.
> Does this sound reasonable?

In principle, yes. What's the cost of the additional field in terms of
a size increase? If you just need another bit, could that fit into
_PyUnicode_TypeRecord.flags instead?

> I haven't made any contributions to Python before, but I heard attempting
> such hazardous activity involves lots of hard knocks :-) Where should I
> send the patch? I saw some patches here in other threads, but then again
> http://www.python.org/dev/patches/ tells to use SourceForge.

That would be best. You only need to include the patch to the generator,
not the generated data. I'd like to see it in 2.6, so ideally, you would
test it for the trunk (not that the branch should matter much)).

Don't forget to include test suite and documentation changes.

Regards,
Martin


More information about the Python-3000 mailing list