Hey all,

Totally baffled by this...maybe I need a nap. Writing a small function to 
reject input that is not a list of 19 fields.

def breakLine(value):
    if value.__class__() != [] and value.__len__() != 19:
        print 'You must pass a list that contains 19 fields.'
    else:
        print 'YAY!'

If I pass:
breakLine([])

I get:
YAY!

I expect:
You must pass a list that contains 19 fields.

If I print len(value) I get: 0

What is going on here?

Thanks!




[cid:image001.png@01CC148A.3C0C1950]

Joe Leonardo | Business Intelligence Analyst | 
DataLogix<http://www.datalogix.com>
303.327.1730 d | 415.812.5244 c | 
joe.leona...@datalogix.com<mailto:joe.leona...@datalogix.com>

Better Marketing through Data(tm)


<<inline: image001.png>>

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to