From 57200c9d747f9806f4efbd1a18cb5f6aa202c74e Mon Sep 17 00:00:00 2001 From: Alda Luong Date: Tue, 12 Sep 2017 11:54:07 -0700 Subject: [PATCH] Updated some code comments. --- optimizely/helpers/event_tag_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/optimizely/helpers/event_tag_utils.py b/optimizely/helpers/event_tag_utils.py index dce9af41..b9d90be4 100644 --- a/optimizely/helpers/event_tag_utils.py +++ b/optimizely/helpers/event_tag_utils.py @@ -46,8 +46,8 @@ def get_numeric_value(event_tags, logger=None): logger: Optional logger. Returns: - A float numeric metric value when the provided numeric metric value - are in the following format: + A float numeric metric value is returned when the provided numeric + metric value are in the following format: - A string (properly formatted, e.g., no commas) - An integer - A float or double @@ -74,6 +74,7 @@ def get_numeric_value(event_tags, logger=None): try: if isinstance(numeric_metric_value, (numbers.Integral, float, str)): # Attempt to convert the numeric metric value to a float + # (if it isn't already a float). cast_numeric_metric_value = float(numeric_metric_value) # If not a float after casting, then make everything else a None.