Language change and code breaks (fwd)
kosh
kosh at aesaeion.com
Sat Jul 21 18:05:59 EDT 2001
Skip Montanaro wrote:
>
> >> That does bring up the subject of machine-generated symbols though.
> >> And case sensitivity in dictionaries. I use base52 [A-Za-z] encoded
> >> md5's in certain contexts. If I use those as keys, will it break?
>
> kosh> Losing case sensitivity in dictionaries would screw me pretty
> kosh> badly also.
>
> I think case-sensitivity as we are discussing in this thread runs only to
> identifier and attribute names, not the contents of strings, so while
>
> date = 1
> DATE += 1
> print Date
>
> should print "2" by my understanding,
>
> dict = {"date": 1,
> "DATE": 2,
> "Date": 3}
>
> would create a dictionary of length 3.
>
However self.date and self.__dict__['date] and getattr(self, 'date') are
the same things at this point. So how could self.data be case insensitive
without the dicts being case insensitive? Otherwise I could just set the
items however I wanted by using the __dict__ directly or even better
override the setattr and getattr methods to use the __dict__ so that I
could still do case sensitive stuff.
Overall it seems that if case insensitive is desired then case sensitive
dicts have to go. In which case that will probably be the end of my use of
python and many others.
More information about the Python-list
mailing list