diff --git a/src/icartt/dataset.py b/src/icartt/dataset.py index 9cb3e9b2a71d8c614e7d608738ced27b005d7a30..20dc6d92ae6bb47d99e76743513d48e0905afbd4 100644 --- a/src/icartt/dataset.py +++ b/src/icartt/dataset.py @@ -308,7 +308,7 @@ class Variable: :type miss: float, defaults to -99999.0 """ - def desc(self, splitChar=","): + def desc(self, splitChar=", "): """Variable description string as it appears in an ICARTT file :return: description string @@ -361,10 +361,12 @@ class Variable: self.scale = scale self.miss = miss - # TODO: should this also get a __str__ ? + def __repr__(self): + # TODO: this sould be more meaningful + return "ICARTT Variable object repr" - def __repr__(self): # TODO: this could be more meaningful? - return "ICARTT Variable description" + def __str__(self): + return self.desc() class Dataset: @@ -383,8 +385,6 @@ class Dataset: :param format: """ - # TODO: should this also get a __str__ and a __repr__ ? - @property def nHeader(self): """Header line count @@ -875,6 +875,14 @@ class Dataset: except: pass + def __repr__(self): + # TODO: this could be more meaningful + return "ICARTT Dataset object repr" + + def __str__(self): + # TODO: this could be more meaningful + return "ICARTT Dataset string representation" + def __init__(self, f=None, loadData=True, splitChar=",", format=Formats.FFI1001): # TODO: why is init comming last? """Constructor method""" self.format = format