Skip to content

Commit 4b8ea05

Browse files
committed
collected_fields -> _collected_fields
This has no reason to appear in the public API.
1 parent 84a5bf2 commit 4b8ea05

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

stagpy/_step.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def _get_raw_data(self, name):
268268

269269
def _set(self, name, fld):
270270
sdat = self.step.sdat
271-
col_fld = sdat.collected_fields
271+
col_fld = sdat._collected_fields
272272
col_fld.append((self.step.istep, name))
273273
if sdat.nfields_max is not None:
274274
while len(col_fld) > sdat.nfields_max:

stagpy/stagyydata.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ def __getitem__(self, istep):
228228

229229
def __delitem__(self, istep):
230230
if istep is not None and istep in self._data:
231-
self.sdat.collected_fields = [
232-
(i, f) for i, f in self.sdat.collected_fields if i != istep]
231+
self.sdat._collected_fields = [
232+
(i, f) for i, f in self.sdat._collected_fields if i != istep]
233233
del self._data[istep]
234234

235235
def __len__(self):
@@ -536,8 +536,6 @@ def __init__(self, path=None):
536536
steps (:class:`_Steps`): collection of time steps.
537537
snaps (:class:`_Snaps`): collection of snapshots.
538538
scales (:class:`_Scales`): dimensionful scaling factors.
539-
collected_fields (list of (int, str)): list of fields currently in
540-
memory, described by istep and field name.
541539
"""
542540
if path is None:
543541
path = conf.core.path
@@ -559,7 +557,8 @@ def __init__(self, path=None):
559557
self.steps = _Steps(self)
560558
self.snaps = _Snaps(self)
561559
self._nfields_max = 50
562-
self.collected_fields = []
560+
# list of (istep, field_name) in memory
561+
self._collected_fields = []
563562

564563
def __repr__(self):
565564
return 'StagyyData({})'.format(repr(self.path))

0 commit comments

Comments
 (0)