Skip to content

Commit ad9e30c

Browse files
committed
Documenting dunder (e.g. __iter__) methods without docstrings.
Fixes #60.
1 parent a6317d1 commit ad9e30c

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

gcloud/storage/bucket.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,26 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
"""Create / interact with gcloud storage buckets."""
15+
"""Create / interact with gcloud storage buckets.
16+
17+
If you want to check whether a blob exists, you can use the ``in`` operator
18+
in Python::
19+
20+
>>> print 'kitten.jpg' in bucket
21+
True
22+
>>> print 'does-not-exist' in bucket
23+
False
24+
25+
If you want to get all the blobs in the bucket, you can use
26+
:func:`get_all_blobs <gcloud.storage.bucket.Bucket.get_all_blobs>`::
27+
28+
>>> blobs = bucket.get_all_blobs()
29+
30+
You can also use the bucket as an iterator::
31+
32+
>>> for blob in bucket:
33+
... print blob
34+
"""
1635

1736
import os
1837
import six

0 commit comments

Comments
 (0)