Anonymous - 2008-10-23

hi there,

just wondering ... the return value of ldap::search is a list of dictionaries.  this will make me do something like

set result [::ldap::search ...]
foreach object $result {
  foreach dn [dict keys $object] {
    ...
  }
}

now, each object in an ldap server has one DN only, ever.  right?  therefore the inner loop will iterate exactly once always, because there is no object without a DN either.  correct?
hence i am wondering whether the return value of ldap::search could/should not simply have been a dict where the keys are the dn's of the objects returned.  returning a list of dicts, it seems to me, unneccessarily requires me to write the two-loop solution above where a simple "dict for {dn attrs} $result" should have done the trick.

thoughts?

sincerely
matthias