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

gh-96168: Improve sqlite3 dict_factory example #96457

Merged
merged 3 commits into from
Sep 1, 2022

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Aug 31, 2022

  • use dict comprehension
  • use doctest iso. testcode, for visualising the
    effect of the row factory
  • SELECT with multiple columns, so the effect of
    the row factory becomes clearer

- use dict comprehension
- use doctest iso. testcode, for visualising the
  effect of the row factory
- SELECT with multiple columns, so the effect of
  the row factory becomes clearer
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

A couple minor comments, otherwise LGTM 👍 It looks a lot clearer to me than before, as well as more testable, concise and following more modern coding practices.

Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Show resolved Hide resolved
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
@erlend-aasland
Copy link
Contributor Author

Thanks for the reviews, CAM & Ezio!

@erlend-aasland erlend-aasland merged commit 91f40f3 into python:main Sep 1, 2022
@miss-islington
Copy link
Contributor

Thanks @erlend-aasland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

@erlend-aasland erlend-aasland deleted the sqlite-docs-dict-factory branch September 1, 2022 21:48
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Sep 1, 2022
@bedevere-bot
Copy link

GH-96494 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 1, 2022
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit 91f40f3)

Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
@bedevere-bot
Copy link

GH-96495 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 1, 2022
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit 91f40f3)

Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Sep 1, 2022
miss-islington added a commit that referenced this pull request Sep 1, 2022
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit 91f40f3)

Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
miss-islington added a commit that referenced this pull request Sep 1, 2022
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit 91f40f3)

Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants