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

Should readdir return an iterator? #27393

Open
malmaud opened this issue Jun 3, 2018 · 1 comment
Open

Should readdir return an iterator? #27393

malmaud opened this issue Jun 3, 2018 · 1 comment
Labels
collections Data structures holding multiple items, e.g. sets filesystem Underlying file system and functions that use it

Comments

@malmaud
Copy link
Contributor

malmaud commented Jun 3, 2018

Seems kind of weird that readdir just returns a Vector{String} instead of a lazy generator, since you can always go from the latter to the former. For reference, Python's pathlib.Path.iterdir, the equivalent function, does return a generator.

@ararslan ararslan added collections Data structures holding multiple items, e.g. sets filesystem Underlying file system and functions that use it labels Jun 3, 2018
@StefanKarpinski
Copy link
Member

It does seem like an iterator would be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collections Data structures holding multiple items, e.g. sets filesystem Underlying file system and functions that use it
Projects
None yet
Development

No branches or pull requests

3 participants