comparison wsgraph/utils.py @ 8:f1f7a505e0d0

__contains__ method
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 10 Dec 2012 17:08:02 -0800
parents
children
comparison
equal deleted inserted replaced
7:9016b126aa87 8:f1f7a505e0d0
1 """
2 utility functions that should be in core python
3 """
4
5 def isiterable(instance):
6 try:
7 iter(instance)
8 return True
9 except TypeError:
10 return False