ebmlite
ebmlite copied to clipboard
Support Path objects where filenames are used
In functions/methods that use a string to specify a path or filename, we should also support the use of pathlib.Path objects. For example, in Document.__init__(), isinstance(stream, (str, bytes, bytearray)) is used to identify a filename vs. a stream; we should add Path to that second argument, and that's about all we'd need to do.
In places where other code expects a string, we can cast to str to handle something that may either be a str or a Path.
Path objects for loading schemata were introduced as part of #103, but there are other places it could be implemented.