#4064 HIGH First D: find() incompatible with DBus

Zarro Boogs per Child bugtracker at laptop.org
Mon Oct 8 15:00:29 EDT 2007


#4064: find() incompatible with DBus
------------------------+---------------------------------------------------
  Reporter:  bert       |       Owner:  bcsaller              
      Type:  defect     |      Status:  new                   
  Priority:  high       |   Milestone:  First Deployment, V1.0
 Component:  datastore  |     Version:                        
Resolution:             |    Keywords:                        
  Verified:  0          |  
------------------------+---------------------------------------------------

Comment(by tomeu):

 Replying to [comment:3 bert]:
 > Replying to [comment:2 tomeu]:
 > > Bert, sending an empty list would return all the properties an entry
 has.
 >
 > Maybe, although that is counter-intuitive (the default parameter in the
 source is None not an empty list). Anyway, sending in a useless empty list
 is arguably not as nice as just not adding a parameter to the query.

 I would prefer to do like you say, but you cannot send None through
 dbus...

 > And what if we want to add an option to exclude specific properties? Add
 another argument? IMHO having all these things as query parameters makes a
 whole lot more sense, is easier to document etc. Like, why is limiting the
 number of items a query parameter, but not the number of properties? And,
 what do you actually gain by that extra parameter?

 I agree on that.

 > You can easily use a keyword argument at the calling side if I am not
 misreading the code.

 Not when calling through dbus, AFAIK. Anyway, passing a dictionary like
 the query param is the same thing.

-- 
Ticket URL: <https://dev.laptop.org/ticket/4064#comment:4>
One Laptop Per Child <https://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list