[Python-3000] Adaption & generic functions [was Generic functions]

Fred L. Drake, Jr. fdrake at acm.org
Fri Apr 7 21:39:42 CEST 2006


On Friday 07 April 2006 14:43, Walter Dörwald wrote:
 > You use the int() protocol to get an int from a string:
 > int("42"), the same way as you use the Sequence() protocol to get a
 > Sequence. (And if you're passing a long string, (i.e. int(100*"42")) you
 > don't even get an int.

Not all single-arg calls that return something based on the input are 
adaptations.  While this particular case *might* be reasonable to describe as 
adaptation (it's unclear to me), the fact that this call happens to be to the 
target type is not necessarily significant.


  -Fred

-- 
Fred L. Drake, Jr.   <fdrake at acm.org>


More information about the Python-3000 mailing list