[Python-Dev] Argument Clinic: what to do with builtins with non-standard signatures?

Larry Hastings larry at hastings.org
Fri Jan 24 16:19:48 CET 2014


On 01/24/2014 07:07 AM, Larry Hastings wrote:
> b) Functions where there's no static Python value that behaves 
> identically to
>    not passing in that parameter (aka "the dynamic default problem")

Ouch!  Sorry, I forgot a detail here.  This can also be another form of 
NULL problem.  For example, socket.socket.getservbyport() takes an 
optional "protocol" argument.  Internally its default value is NULL.  
But there's really no good static string that we could use for the 
default.  Guido specifically suggested accepting None here to mean "use 
the internal default" should be fine.  But again this is a change, we're 
in beta, etc etc, discuss.


//arry/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140124/3ba23660/attachment.html>


More information about the Python-Dev mailing list