| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Thanks, Mariusz! I wonder if we should put these hints in their own how-to. @CAM-Gerlach and @ezio-melotti, what do you think? |
Sorry, something went wrong.
|
I remember noticing the "unusual" query with no FROM clause, and I figured out how it worked from the output. Having a more explicit explanation just after the example makes things clearer. If the note is moved elsewhere it might be harder to find unless you add a link to it. I'm also not entirely sure about what else you were thinking to add in the how-to. Regarding the note itself, I wonder if the wording could be simplified a bit, since in just two sentences it talks about clauses, statements, row, columns, expressions, literals, and aliases. Even though it's correct and understandable, if the reader is not familiar with all the terms, it might take a couple of re-reads to understand it. |
Sorry, something went wrong.
I'm not sure if it's worth. For example, in Django we try to avoid duplicating of 3rd-party documentation. |
Sorry, something went wrong.
We could use constant values instead of literals, and names instead of aliases to reduce the number of terms, e.g. diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index f6a8714519..6d9b1c22ce 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -2523,7 +2523,7 @@ Queries now return :class:`!Row` objects:
The ``FROM`` clause can be omitted in the ``SELECT`` statement, as in the
above example. In such cases, SQLite returns a single row with columns
- defined by expressions, e.g. literals, with the given aliases
+ defined by expressions, e.g. constant values, with the given names
``expr AS alias``.
You can create a custom :attr:`~Cursor.row_factory`On the other hand, the term literal is already used multiple times in this page 🤷 |
Sorry, something went wrong.
|
I think 'literal' is fine in programming language docs ;) |
Sorry, something went wrong.
|
Thanks @felixxm for the PR, and @erlend-aasland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, something went wrong.
|
Thanks @felixxm for the PR, and @erlend-aasland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, something went wrong.
…ythonGH-106513) (cherry picked from commit fc7ff1a) Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
…ythonGH-106513) (cherry picked from commit fc7ff1a) Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
GH-106645 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
|
GH-106646 is a backport of this pull request to the 3.11 branch. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
📚 Documentation preview 📚: https://cpython-previews--106513.org.readthedocs.build/