Typing arguments in python
Dale Strickland-Clark
dale at riverhall.NOTHANKS.co.uk
Wed Apr 16 13:40:34 EDT 2003
Alex Martelli <aleax at aleax.it> wrote:
>Dale Strickland-Clark wrote:
> ...
>>>def f(fileobj):
>>> write = fileobj.write
>>> write('')
>>> # rest of function follows -- just call write('...') when needed
>>
>> Way too fussy and obscure for my liking. Also, the assert is debugging
>> code and nicely goes away in production.
>
>...while the bound-methods stay in local variables and accelerate operations
>even "in production" -- oh woe! No accounting for tastes, I guess;-)
>
>
>Alex
It might grow on me. ;-)
--
Dale Strickland-Clark
Riverhall Systems Ltd
More information about the Python-list
mailing list