Robert Schuppenies <[EMAIL PROTECTED]> added the comment:

The attribute error is caused by pattern_getattr, which tries to find
__sizeof__, fails and then sets the error message. I don't know if
casting the error is the right thing to do. Actually, sys.getsizeof()
should work on any type.

Another suggestion was a that sys.getsizeof allows one optional
argument for a default size. If the default argument is provided,
sys.getsizeof will not throw an exception (if the __sizeof__ method is
missing or for any other error), but instead return the given default
size.
Still, an agreement on the right error message is needed.

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3122>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to