Anthony Tolle wrote: > So how does wrapper1 know whether it is wrapping a static method, a > bound method, or an unbound method? Well, one way it could do this is > to examine the type of the descriptor it is wrapping.
No, a wrapper can't distinguish between a plain function and an unbound method this way, because it gets called before the function is put into a class. So it's always wrapping a plain function, not an unbound method object. -- Greg _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com