ooici/pyon — pull request #194 by ifreecarve (2012-12-05 00:37:49+00:00)
Title: removes special case of read_mult on 0 resource ids by simply returning []

This is NOT UNIT TESTED but works in practice.

This commit removes a special case in read_mult -- for any number of resource_ids, read_mult returns that number of resources. Previous behavior was to raise an error if 0 resource_ids were supplied. The previous behavior seems sensible, unless you consider cases where a search algorithm might gather some list of resource_ids then want to convert them all to resources.

The new behavior makes option A equivalent to option B, which is what you'd expect:

```python

resource_ids = find_some_resource_ids()

#option A

resource_objs = resource_registry_client.read_mult(resource_ids)

#option B

resource_objs = [resource_registry_client.read(r) for r in resource_ids]

```