On 03/19/2010 03:08 AM, Sylvain Thénault wrote:
On 19 mars 02:58, Fletcher Johnson wrote:

IMO we should:
* *not infer anything here*
* check for 2-uple and warn about potential misspelling of the assert statement
* check for literal true (eg True, not empty container, non zero number, etc..)
   of false (False, None, 0, etc...) expression and warn about always/never 
verified
   assertion

I'm not really sure what you are looking for in the literal
false/true cases. Do we want to generate warnings for statements
such as 'assert 5'?

Currently I only understand that we would want to check assertion
statements where we are issuing a statement such as 'assert (x,msg)'
because the user probably meant assert x, msg. This means that we no
longer care about checking statements like 'assert (x,)' even though
python gives a warning.

right.
Did you want it to warn on all types that are always true?
I'm looking at the types here in '6.1 Truth Value Testing'-> http://docs.python.org/library/stdtypes.html and it says that "All other values are considered true — so objects of many types are always true."

or would it be fine to only test those elementary types (the ones in the bullet point listing)?

_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to