Home | Trees | Indices | Help |
|
---|
|
1 """Conversion of float values to hide the scary scary numbers""" 2 3 # User friendly strings for thresholds 4 levelStrings = {-.6: 'strong negative', 5 -.3: 'negative', 6 0.0: 'weak negative', 7 0.3: 'weak positive', 8 0.6: 'positive', 9 1.0: 'strong positive' 10 } 11 _levels = levelStrings.keys() 12 _levels.sort() 1315 return _levels1618 for level in _levels: 19 if value <= level: 20 return levelStrings[level] 21 else: 22 return 'very high'23 ## raise ValueError,'Value exceeds maximum level: %5.3f' % (value) 24
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Aug 19 16:50:09 2009 | http://epydoc.sourceforge.net |