Skip to content

Commit 01fa4aa

Browse files
committed
"add __repr__ function to class PVSystem and LocalizedPVSystem"
1 parent 4073821 commit 01fa4aa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pvlib/pvsystem.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ def __init__(self,
139139

140140
# needed for tying together Location and PVSystem in LocalizedPVSystem
141141
super(PVSystem, self).__init__(**kwargs)
142+
143+
def __repr__(self):
144+
return 'PVSystem with tilt:' + str(self.surface_tilt) + ' and azimuth: ' + str(self.surface_azimuth)
142145

143146
def get_aoi(self, solar_zenith, solar_azimuth):
144147
"""Get the angle of incidence on the system.
@@ -452,6 +455,9 @@ def __init__(self, pvsystem=None, location=None, **kwargs):
452455
list(kwargs.items()))
453456

454457
super(LocalizedPVSystem, self).__init__(**new_kwargs)
458+
459+
def __repr__(self):
460+
return 'LocalizedPVSystem'
455461

456462

457463
def systemdef(meta, surface_tilt, surface_azimuth, albedo, series_modules,

0 commit comments

Comments
 (0)