Closed xrotwang closed 4 years ago
Ok, bolting on the factory method API while keeping the old one isn't too hard. But I'd still deprecrate read_file
and read_string
, ok?
Yes, deprecate. I think most accesses I know of are via NexusReader(filename)
, and the others (especially read_string
) were mainly used to make tests better.
I'm somewhat reluctant to break backwards compatibility for stylistic reasons, but
NexusReader.read_string
andNexusReader.read_file
are just a bit weird, in particular the former, even returningself
.I'd say the "real" API should look like this:
One could add
read_file
back in, and deprecate it. But would you think that's worth it? I.e. how much code depends on theNexusReader
API?