Glenn Linderman wrote:
> 1) Both the format message and all the parameters are supplied in a
> single API call.  This is really a foolish API, because
> 
>    def API( fmt, p1, p2, p3 ):
>     str = fmt % (p1, p2, p3)
> 
> could have just as easily been documented originally as
> 
>    def API( str ):
> 
> where the user is welcome to supply a string such as
> 
>    API( fmt % (p1, p2, p3 ))
> 
> and if done this way, the conversion to .format is obvious... and all
> under the users control.

The lazy APIs actually make a lot of sense, particularly when there is a
chance that the function being called may be able to avoid the
formatting call altogether.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to