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


Hi,

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:

-- 
alfz1



More information about the Python-list mailing list