[issue17921] explicit empty check instead of implicit booleaness

2013-05-08 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue17921] explicit empty check instead of implicit booleaness

2013-05-06 Thread R. David Murray
R. David Murray added the comment: Or, to be more helpful than that short answer: if you think there is something that isempty can do that len can't that makes it worth adding complexity to the language, please discuss it on the python-ideas mailing list first. That's the best place to get fe

[issue17921] explicit empty check instead of implicit booleaness

2013-05-06 Thread R. David Murray
R. David Murray added the comment: Just use len. -- nosy: +r.david.murray resolution: -> rejected stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue17921] explicit empty check instead of implicit booleaness

2013-05-06 Thread lesmana
New submission from lesmana: Python should have a builtin method `isempty()` which calls the special method name `__isempty__()` for explicit emptiness check. The special method `__isempty__()` should return `True` if the object is "empty" and `False` if the object is "not empty". Observe emp