Update collections.py

Issue #3887
Merge pull request #3888 from rainwoodman/patch-1

Update collections.py