jQuery recursive iteration over objects

The .find(‘selector’) method is basically a recusive version of .children(), and will find any descendant object that matched the selector, as opposed to .children() which only finds objects in the first level of descendants. 2nd EDIT (I phrased badly the first time, and messed up the code a bit!): Ok, I don’t think this functionality … Read more

What exactly is Python’s iterator protocol?

It’s located here in the docs: One method needs to be defined for container objects to provide iteration support: container.__iter__() Return an iterator object. The object is required to support the iterator protocol described below. If a container supports different types of iteration, additional methods can be provided to specifically request iterators for those iteration … Read more