clean up comments and remove py2 parts

This commit is contained in:
2019-10-16 15:17:08 +02:00
parent 494f0c4a60
commit b474188d1a
3 changed files with 1 additions and 7 deletions

View File

@@ -10,7 +10,6 @@
.. moduleauthor:: Daniel Weschke <daniel.weschke@directbox.de>
"""
from __future__ import print_function
import math
import pickle
@@ -44,7 +43,6 @@ def read(file_name, x_column, y_column, default=None, verbose=False):
y = []
for row in file:
fields = re.split(r'\s+', row.strip())
#print(filds)
x.append(float(fields[x_column]))
y.append(float(fields[y_column]))
file.close()
@@ -157,7 +155,6 @@ def seq(start, stop=None, step=1):
exponent = max(start_exp, step_exp) # no stop because it is an open bound
n = int(math.ceil((stop - start)/float(step)))
#n = int((stop - start)/float(step)) # in py3 math.ceil returns int
lst = []
if n > 0:
lst = [round(start + step*i, exponent) for i in range(n)]
@@ -192,5 +189,5 @@ def get_id(ids, uide):
:returns: full id
:rtype: str or int
"""
# we know it is a unique ending
# take first element, because we know it is a unique ending
return [idi for idi in ids if idi.endswith(uide)][0]

View File

@@ -10,7 +10,6 @@
.. moduleauthor:: Daniel Weschke <daniel.weschke@directbox.de>
"""
from __future__ import division, print_function, unicode_literals
def gaußsche_osterformel(year):
"""Gaußsche Osterformel.

View File

@@ -10,10 +10,8 @@
.. moduleauthor:: Daniel Weschke <daniel.weschke@directbox.de>
"""
from __future__ import division, print_function, unicode_literals
from time import struct_time, mktime
def in_seconds(time):
"""If time is `time.struct_time` convert to float seconds.