Duncan Booth <duncan.bo...@invalid.invalid> writes: >>>>> import cPickle as p >>>>> p.dumps([]) >> '(l.' >>>>> p.dumps([].append) >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> TypeError: expected string or Unicode object, NoneType found > > Not the best of examples: [].append is a built-in method rather than a > bound method.
Sorry about the confusion. By bound method I meant the callable obtained by binding a method (built-in or written in python) to a concrete instance, as opposed to an unbound method, such as list.append. The reprs are different for built-in methods and for python methods, but I consider that difference an artifact of the CPython implementation, not a distinction mandated by the language. -- http://mail.python.org/mailman/listinfo/python-list