similar way, I'm
simply trying to raise the question of where the genericity could sit: in
the dictionary or in the key.
Nigel
On 30 October 2013 17:04, Ethan Furman wrote:
> On 10/30/2013 09:34 AM, Nigel Small wrote:
>
>>
>> It strikes me that there could be an alternative
It strikes me that there could be an alternative approach to some of the
use cases discussed here. Instead of a new type of dictionary, the
case-insensitivity problem could be solved with something akin to a *
CaseInsensitiveString* class used for keys within a standard dictionary.
This would be ve
Could a more generic variant of this class work? In the same way that
`sorted` can accept a comparison function, similar could be done for a
dictionary-like class:
d = transformdict(key=str.lower)
Strictly speaking, this would provide case-insensitive but not
case-preserving behaviour. For any gi