muppy py3k ready

1 view
Skip to first unread message

Robert Schuppenies

unread,
May 8, 2009, 7:02:03 PM5/8/09
to pympl...@googlegroups.com
I just checked in the changes to get muppy py3k ready. The test cases go green
with one exception. But this is due to what seems like a bug in Python 3000 to
me. I filed a report for it at http://bugs.python.org/issue5964.

The problem is with the class WeakSet which has been added in Py3k. If compared
to a non-set class, it will raise an error. A common use case would be this:

>>> if o not in objects:
>>> print("yepp")

If one of the objects is a WeakSet, but o is not, the exception is raised.

To deal with it I created a helper function in pympler.compat which provides
the same functionality. Not beautiful but does the job. Do you have a better
suggestion to deal with it?

Is this a good default strategy for the future with with errors which we do not
think are caused by us?


cheers,
robert

Reply all
Reply to author
Forward
0 new messages