if Request("something") == None: doesn't work

Donn Cave donn at drizzle.com
Thu May 13 02:08:11 EDT 2004


Quoth "Sam Sungshik Kong" <ssk at chol.nospam.net>:
...
| When there's no argument in the request,
|
| Request("id") == None returns False
| if Request("id"): returns True
| str(Request("id")) returns "None"
| repr(Request("id")) returns <COMObject<unknown>>
|
| So my conclusion is that Request("id") is not None.
| It's an object, str() of which is accidentally "None".
| That confused me.

It would confuse anyone.  That's pretty bad.

	Donn Cave, donn at drizzle.com



More information about the Python-list mailing list