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:[email protected]]
Joe Leonardo | Business Intelligence Analyst |
DataLogix<http://www.datalogix.com>
303.327.1730 d | 415.812.5244 c |
[email protected]<mailto:[email protected]>
Better Marketing through Data(tm)
<<inline: image001.png>>
-- http://mail.python.org/mailman/listinfo/python-list
