Serhiy Storchaka added the comment:

Updated patch includes tests for the function is None. There were no tests for 
assertRaises(), the patch adds them, based on tests for assertWarns().

> Why not sentinel = Object()?

Only for better repr in the case the sentinel is leaked. Other variants are to 
make it named object, such as a function or a class, as Magnus suggested.

----------
Added file: http://bugs.python.org/file39306/assert_raises_sentinel_2.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24134>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to