boto/boto3 — pull request #11 by danielgtaylor (2014-10-31 22:07:42+00:00)
Title: Implement resource equality based on identifiers.

This pull request adds two related features. First, it adds resource instance
equality by comparing the classes and identifiers of two resources. If they
share the same class (e.g. `s3.Bucket`) and the same identifiers (e.g.
`name`) then they are considered equal.

```python
>>> b1 = s3.Bucket('boto3')
>>> b2 = s3.Bucket('boto3')
>>> b1 == b2
True
```

Related to equality, this also implements reloading of attributes
after an action has been performed. Imagine the following scenario:

```python
>>> o = s3.Object('boto3', 'test.txt')
>>> o.put(Body='hello')
>>> print(o.last_modified)
datetime(2014, 10, 31, 0, 0, 0)

>>> o.put(Body='hello, world')

>>> print(o.last_modified)
datetime(2014, 10, 31, 0, 0, 20)

>>> o2 = s3.Object('boto3', 'test.txt')
>>> o == o2
True
>>> o.last_modified == o2.last_modified
True
```

Updated documentation and tests to reflect these changes.

cc @jamesls, @kyleknap. Definitely open to suggestions on this one, but I think this is the most intuitive approach for people coming to use the SDK.