Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileReader.ext and FileReader.extension are dissimilar in function but too similar in name #38

Open
krzywon opened this issue Jul 26, 2023 · 0 comments

Comments

@krzywon
Copy link
Collaborator

krzywon commented Jul 26, 2023

The file suffix and the file format are distinct concepts, with the reader able to handle a format different from the that suggested by the suffix. Future you will benefit from attribute names that clearly distinguish them.

From the code it looks like the extension attribute is the file format, assigned from the lowercase suffix. The doc string should say that it is the format.

self.extension and self.ext will cause confusion. I suggest renaming self.ext to indicate that is a set of valid file formats.

In the case where the format is different from the suffix you may need an additional parameter to the read call to specify the format.

Originally posted by @pkienzle in #37 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant