BIND 10 #1179: python interface for data source

BIND 10 Development do-not-reply at isc.org
Tue Sep 27 09:10:17 UTC 2011


#1179: python interface for data source
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  jelte
  jinmei                             |                Status:  reviewing
                       Type:  task   |             Milestone:
                   Priority:  major  |  Sprint-20110927
                  Component:  data   |            Resolution:
  source                             |             Sensitive:  0
                   Keywords:         |           Sub-Project:  DNS
            Defect Severity:  N/A    |  Estimated Difficulty:  4
Feature Depending on Ticket:         |           Total Hours:  0
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Changes (by vorner):

 * owner:  vorner => jelte


Comment:

 Hello

 Replying to [comment:13 jelte]:
 > Replying to [comment:12 vorner]:
 > > How is that so? In works in C++ tests, who stops you from creating
 them?
 > >
 >
 > ok,ok, my laziness does :)
 >
 > the c++ tests compare raw wire data while i compare rdata structures in
 these tests, and 'FAKEFAKEFAKE' is not valid RRSIG rdata, but we could do
 the same here. Haven't done so yet (it would make the helper functions
 uglier if i need to pass multiple sets of raw data around), but you may
 insist :)

 After thinking about the code more closely, I now see the difference. So,
 laziness is the basic trait of every programmer and it's needed, therefore
 leave it this way.

 > > One comment to the code. What is the purpose of the smiley?
 > > {{{#!python
 > > expected_rrsets[:]
 > > }}}
 > >
 > > If you mean the whole list, the brackets don't need to be there.
 >
 > It's a copy (by way of a slice over the whole list). Technically it's
 not necessary, since we return straight away, but in general it is a bad
 idea to modify something you're iterating over, so I prefer to make a copy
 in such cases. List(expected_rrsets) or copy.copy(expected_rrsets) are
 fine in this scenario too, but i'm quite partial to the [:] notation :)

 U-huh. That looks like a perl way to do a copy! :-)). Is it a common
 construction I just don't know, or should it be explained in a comment?

 I just thought about one more thing ‒ do we need a changelog entry? Maybe
 not, as this is part of the whole bigger refactoring and changes to the
 API, so it will be covered by it.

 Anyway, feel free to merge.

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


More information about the bind10-tickets mailing list