Re: python strings

jredford@lehman.com
Thu, 21 Apr 94 10:48:53 -0400

>> I agree in general. My only excuse is that most of the code that
>> requires a particular type is older than the language features you
>> mention. There are a few cases where I wouldn't want the automatic
>> conversion to integers (e.g. floats -- imagine the surprise if
>> range(10)[3.14] returns 3 instead of raising a TypeError) but that can
>> be taken care of somehow. Fixes to the code that solve this kind of
>> problem for a particular module or object type will be gratefully
>> accepted :-)

This relates to two issues I had mentioned a while back.. mainly that
I was looking for a better type switching system than checking against
the address of the type definition, and that I wanted to be able to
pass tuples or lists without having to think hard about it.

Perhaps it would be possible to gracefully extend the typeing
structures to include a bitmask of functional type interface.

00000001 = integerable
00000010 = floats
00000100 = sequence
00001000 = mapping
00010000 = callable

And so on and so on...

This might even lead to more efficient function signature checking,
but you didnt hear it from me...

--
John Redford (AKA GArrow) | 3,600 hours of tape.
jredford@lehman.com       | 5 cans of Scotchguard.