Add comment on decimal place override

This commit is contained in:
Mika Bostrom 2010-08-22 14:12:29 +03:00 committed by Gerko de Roo
parent a75ba5a288
commit cf1d8fb5e8

View File

@ -93,6 +93,11 @@ def do_stat(stat_dict, player = 24, stat = 'vpip'):
result = eval("%(stat)s(stat_dict, %(player)d)" % {'stat': stat, 'player': player}) result = eval("%(stat)s(stat_dict, %(player)d)" % {'stat': stat, 'player': player})
# If decimal places have been defined, override result[1] # If decimal places have been defined, override result[1]
# NOTE: decimal place override ALWAYS assumes the raw result is a
# fraction (x/100); manual decimal places really only make sense for
# percentage values. Also, profit/100 hands (bb/BB) already default
# to three decimal places anyhow, so they are unlikely override
# candidates.
if match: if match:
base = stat[0:-2] base = stat[0:-2]
places = int(stat[-1:]) places = int(stat[-1:])