Skip to content

Commit fe03325

Browse files
authored
Merge pull request #233 from ToFuProject/Issue232_MinorDebug
[#232] More robust loading
2 parents 53697ec + cd5eff5 commit fe03325

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

datastock/_class0.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def save(
172172
verb=True,
173173
):
174174

175-
lsep = [';', '&', '?', '#', ',', '~', '.', '-', '_']
175+
lsep = ['::', ';;', '&&', '??', '##', ',,', '~~', '..', '__']
176176
if sep is None:
177177
for ss in lsep:
178178
c0 = (
@@ -214,4 +214,4 @@ def save(
214214

215215
__all__ = [
216216
sorted([k0 for k0 in locals() if k0.startswith('DataStock')])[-1]
217-
]
217+
]

datastock/_saveload.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ def load(
290290
dout[k0] = list(dflat[k0])
291291
elif typ == 'str':
292292
dout[k0] = str(dflat[k0])
293+
elif isinstance(dflat[k0], str) and 'str' in typ:
294+
dout[k0] = dflat[k0]
293295
elif typ == 'chararray':
294296
dout[k0] = dflat[k0]
295297
elif typ in ['int']:
@@ -579,4 +581,4 @@ def _get_files_from_path(
579581
else:
580582
warnings.warn(msg)
581583

582-
return out
584+
return out

0 commit comments

Comments
 (0)