Nick Coghlan <ncogh...@gmail.com> added the comment: weakref.proxy needs to be fixed to delegate the unicode slot correctly.
>>> from weakref import proxy >>> "__unicode__" in dir(type(proxy(Exception))) False That predicate must return true in order for the delegation to do the right thing (this is actually the case for all of the slots and pseudo-slots that can bypass __getattribute__ on the instance object - it's just that most of them are already handled correctly). This need to explicitly delegate all supported slots is the reason why weakref proxy instances add so many magic method stubs when compared to the actual interface of the underlying class: >>> len(set(dir(type(proxy(Exception)))) - set(dir(Exception))) 53 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5037> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com