caseless dictionary howto ?

Stef Mientki S.Mientki-nospam at mailbox.kun.nl
Tue Jun 19 15:16:44 EDT 2007


hello,

I need to search a piece of text and make all words that are equal
(except their case) also equal in their case, based on the first occurrence.
So I'm using a dictionary to store names and attributes of objects.
As as I need to search on the caseless name (so I've choosen lowercase),
My dictionairy looks like this:

     self.procs [ "serial_hw_read"  ] = ( "Serial_HW_Read", "F", "++", T)

Is this really a good solution,
or are there better ways ?

thanks,
Stef Mientki



More information about the Python-list mailing list