mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
xrange deprecated in python3, change to range
thanks to Sumit Bhardwaj for the hint
This commit is contained in:
@@ -129,7 +129,7 @@ def period_end(start_year, start_month, period_type):
|
||||
|
||||
|
||||
def generate_period_boundaries(start_year, start_month, period_type, periods):
|
||||
for i in xrange(periods):
|
||||
for i in range(periods):
|
||||
yield ( date(start_year, start_month, 1),
|
||||
period_end(start_year, start_month, period_type) )
|
||||
start_year, start_month = next_period_start(start_year, start_month,
|
||||
|
||||
@@ -67,7 +67,7 @@ def gnc_numeric_from_decimal(decimal_value):
|
||||
numerator_place_value = 1
|
||||
# add each digit to the final value multiplied by the place value
|
||||
# from least significant to most sigificant
|
||||
for i in xrange(len(digits)-1,-1,-1):
|
||||
for i in range(len(digits)-1,-1,-1):
|
||||
numerator += digits[i] * numerator_place_value
|
||||
numerator_place_value *= TEN
|
||||
|
||||
|
||||
Reference in New Issue
Block a user