Skip to content

Various Improvements #22

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PythonProdigy
Copy link

  1. Removed a redundant function call
  2. Added exception handling to the file open function

1. Removed a redundant function call
2. Added exception handling to the file open function
print line
except IOError:
print 'Error opening the file'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you forget to close the file after "read" it.Could we add a "finally" syntax ?And what if I read a file which is up to several G and may make it out of memory ?

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

Successfully merging this pull request may close these issues.

2 participants