testing for valid reference: obj vs. None!=obs vs. obj is not None

alf ask at me
Mon Sep 4 22:02:06 CEST 2006


I have a reference to certain objects. What is the most pythonic way to 
test for valid reference:

	if obj:

	if None!=obs:

	if obj is not None:


More information about the Python-list mailing list