From d2483b88665b1ea4ff5fcb49143b5ab31cd5d4eb Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Sun, 22 Aug 2010 14:12:29 +0300 Subject: [PATCH] Add comment on decimal place override --- pyfpdb/Stats.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyfpdb/Stats.py b/pyfpdb/Stats.py index cfe82f0a..285a45ea 100755 --- a/pyfpdb/Stats.py +++ b/pyfpdb/Stats.py @@ -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}) # 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: base = stat[0:-2] places = int(stat[-1:])