### Description
As the title suggests, I have fixed an invalid syntax in the docs for an `except` statement while reading the unusual.
### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)
-->
This pull request is:
- [x] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [ ] A short code fix
- please include the issue number, and create an issue if none exists, which
must include a complete example of the issue. one line code fixes without an
issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests. one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.
**Have a nice day!**
Closes: #8715
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8715
Pull-request-sha:
e8be2bc4a5401ab2a5a0fc1d2e50d41fa437ae80
Change-Id: If8512bf1853f7cdb1ae655f0945cd922fff6fbce
(cherry picked from commit
38636bfd22f236343daf11aef31145ae54867028)
# suppose the database has been restarted.
c.execute(text("SELECT * FROM table"))
c.close()
- except exc.DBAPIError, e:
+ except exc.DBAPIError as e:
# an exception is raised, Connection is invalidated.
if e.connection_invalidated:
print("Connection was invalidated!")