We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The documentation for load_all and safe_load_all states (emphasis mine):
load_all
safe_load_all
... returns a sequence of Python objects ...
In reality, those methods return a generator, which is not the same thing as a sequence. For example:
with open(filename) as f: docs = yaml.safe_load_all(f) for d in docs: # do stuff
will raise ValueError: I/O operation on closed file. which if docs was really a sequence doesn't make sense.
ValueError: I/O operation on closed file.
docs
(Moved from yaml/pyyaml#762)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The documentation for
load_all
andsafe_load_all
states (emphasis mine):In reality, those methods return a generator, which is not the same thing as a sequence. For example:
will raise
ValueError: I/O operation on closed file.
which ifdocs
was really a sequence doesn't make sense.(Moved from yaml/pyyaml#762)
The text was updated successfully, but these errors were encountered: