BIND 10 #167: configure addresses and ports to listen on for DNS servers

BIND 10 Development do-not-reply at isc.org
Fri May 21 17:46:43 UTC 2010


#167: configure addresses and ports to listen on for DNS servers
--------------------------+-------------------------------------------------
 Reporter:  larissas      |        Owner:  UnAssigned                 
     Type:  task          |       Status:  reviewing                  
 Priority:  major         |    Milestone:  04. 2nd Incremental Release
Component:  Unclassified  |   Resolution:                             
 Keywords:                |    Sensitive:  0                          
--------------------------+-------------------------------------------------

Comment(by each):

 > Use AI_NUMERICHOST.

 Hmm.  Thank you, that does work, but it's somewhat more accepting than I
 wanted (for example, it will happily accept an IP address of '2'), and the
 exception it throws when it sees an invalid IP address is the
 counterintuitive "Name or service not known".

 That would be fine if there was big performance win from avoiding the
 exception, but I don't think that's the case.  For one thing we're only
 running this code during command line argument parsing, during which
 performance doesn't matter much.  But more generally, a cascading series
 of "try...catch" statements seems to be very much the "pythonic" way of
 coding.

 (See, for example, _Python 3 for Absolute Beginners_, p. 238: "Some
 langauges try to make exception handling a last resort -- the syntax can
 often be cumbersome and the functionality basic -- and the performance of
 the language interpreter might suffer during its equivalent of 'try'
 statements.  But as you have seen, Python actively _encourages_ error
 handling, through simple syntax with a fully developed flow control based
 on exception handling.  Also, in most Python distributions, exception
 handling is no slower than simple 'if...else' flow control.")

-- 
Ticket URL: <http://bind10.isc.org/ticket/167#comment:8>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list