summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_listcomps.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-119666: fix multiple class-scope comprehensions referencing __class__ ↵Carl Meyer2024-06-101-0/+25
| | | | (#120295)
* gh-74929: Implement PEP 667 (GH-115153)Tian Gao2024-05-041-1/+6
|
* gh-118513: Fix sibling comprehensions with a name bound in one and global in ↵Carl Meyer2024-05-031-0/+14
| | | | | | the other (#118526) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* gh-114828: Fix __class__ in class-scope inlined comprehensions (#115139)Carl Meyer2024-02-071-0/+12
|
* gh-110543: Fix CodeType.replace in presence of comprehensions (#110586)Jelle Zijlstra2023-11-081-2/+43
|
* gh-109182: Fix and improve tests for gh-108654 (GH-109189)Serhiy Storchaka2023-09-111-18/+28
|
* gh-108732: include comprehension locals in frame.f_locals (#109026)Carl Meyer2023-09-071-0/+7
| | | | Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-108654: restore comprehension locals before handling exception (#108659)Carl Meyer2023-08-301-0/+35
| | | Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* gh-105340: include hidden fast-locals in locals() (#105715)Carl Meyer2023-07-051-0/+22
| | | * gh-105340: include hidden fast-locals in locals()
* gh-104602: Add additional test for listcomp with lambda (#104639)Jelle Zijlstra2023-05-191-0/+10
| | | | | This threw a SystemError before #104603. Adding a separate test because this was a different failure mode than the other two new tests from #104603, both of which used to segfault.
* gh-104619: never leak comprehension locals to outer locals() (#104637)Carl Meyer2023-05-191-0/+13
|
* gh-104602: ensure all cellvars are known up front (#104603)Carl Meyer2023-05-191-0/+26
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-104615: don't make unsafe swaps in apply_static_swaps (#104620)Carl Meyer2023-05-181-0/+6
|
* gh-104374: Remove access to class scopes for inlined comprehensions (#104528)Jelle Zijlstra2023-05-181-2/+107
| | | Co-authored-by: Carl Meyer <carl@oddbird.net>
* gh-104404: fix crasher with nested comprehensions plus lambdas (#104442)Carl Meyer2023-05-131-0/+8
|
* gh-104377: fix cell in comprehension that is free in outer scope (#104394)Carl Meyer2023-05-111-4/+55
|
* gh-104357: fix inlined comprehensions that close over iteration var (#104368)Carl Meyer2023-05-111-0/+10
|
* gh-97933: (PEP 709) inline list/dict/set comprehensions (#101441)Carl Meyer2023-05-091-55/+220
| | | | Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* bpo-45229: Use doctest.DocTestSuite instead of run_doctest (GH-28468)Serhiy Storchaka2021-09-201-16/+9
| | | Alo use load_tests() for adding tests.
* bpo-32856: Optimize the assignment idiom in comprehensions. (GH-16814)Serhiy Storchaka2020-02-121-0/+16
| | | | | Now `for y in [expr]` in comprehensions is as fast as a simple assignment `y = expr`.
* bpo-31027: Fix test_listcomps failure when run directly (#2939)Zackery Spytz2017-07-291-1/+1
| | | Bug appears to be incomplete copy-paste-edit.
* having three copies of the same test is surely a bit excessiveBenjamin Peterson2010-12-121-296/+0
|
* #2621 rename test.test_support to test.supportBenjamin Peterson2008-05-201-9/+9
|
* Merged revisions 55225-55227,55229-55269 via svnmerge fromGuido van Rossum2007-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ................ r55238 | guido.van.rossum | 2007-05-10 16:46:05 -0700 (Thu, 10 May 2007) | 9 lines Merged revisions 55227 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r55227 | guido.van.rossum | 2007-05-10 10:20:15 -0700 (Thu, 10 May 2007) | 2 lines Fix a bug in test_c_api() that caused a negative refcount. ........ ................ r55246 | neal.norwitz | 2007-05-11 00:01:52 -0700 (Fri, 11 May 2007) | 1 line Remove commands.getstatus() it is obsolete. ................ r55248 | neal.norwitz | 2007-05-11 00:29:05 -0700 (Fri, 11 May 2007) | 2 lines Remove bsddb185 support. ................ r55249 | neal.norwitz | 2007-05-11 00:29:50 -0700 (Fri, 11 May 2007) | 1 line Remove bsddb185 module too ................ r55250 | neal.norwitz | 2007-05-11 00:32:13 -0700 (Fri, 11 May 2007) | 1 line bsddb185: Gotta remove from the file checked in, not Setup ................ r55251 | neal.norwitz | 2007-05-11 00:53:26 -0700 (Fri, 11 May 2007) | 1 line Remove obsolete IRIX modules (as much as I could find, there is probably more) ................ r55252 | neal.norwitz | 2007-05-11 00:55:35 -0700 (Fri, 11 May 2007) | 1 line Remove SGI turd. ................ r55254 | georg.brandl | 2007-05-11 03:11:01 -0700 (Fri, 11 May 2007) | 2 lines Add a case for set comprehensions to the "cannot assign to" switch. ................ r55255 | georg.brandl | 2007-05-11 03:11:25 -0700 (Fri, 11 May 2007) | 2 lines Fix wrong imports. ................ r55261 | georg.brandl | 2007-05-11 07:37:48 -0700 (Fri, 11 May 2007) | 2 lines Remove removed tex files. ................ r55262 | georg.brandl | 2007-05-11 08:28:41 -0700 (Fri, 11 May 2007) | 2 lines Commit PEP 3132 implementation. ................ r55264 | georg.brandl | 2007-05-11 08:50:19 -0700 (Fri, 11 May 2007) | 2 lines Check in the inevitable AST version number and format Py_ssize_t with %zd. ................ r55265 | neal.norwitz | 2007-05-11 09:12:22 -0700 (Fri, 11 May 2007) | 1 line Remove mention of os.popen* and popen2.* since these will be removed. ................ r55266 | neal.norwitz | 2007-05-11 09:19:57 -0700 (Fri, 11 May 2007) | 1 line Get doc to build again (almost, the doc is fine) ................ r55267 | neal.norwitz | 2007-05-11 09:21:02 -0700 (Fri, 11 May 2007) | 1 line Really get doc to build (remove use of string module) ................ r55269 | neal.norwitz | 2007-05-11 09:29:43 -0700 (Fri, 11 May 2007) | 1 line Add some notes to cleanup later ................
* Merged revisions 55007-55179 via svnmerge fromGuido van Rossum2007-05-071-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r55077 | guido.van.rossum | 2007-05-02 11:54:37 -0700 (Wed, 02 May 2007) | 2 lines Use the new print syntax, at least. ........ r55142 | fred.drake | 2007-05-04 21:27:30 -0700 (Fri, 04 May 2007) | 1 line remove old cruftiness ........ r55143 | fred.drake | 2007-05-04 21:52:16 -0700 (Fri, 04 May 2007) | 1 line make this work with the new Python ........ r55162 | neal.norwitz | 2007-05-06 22:29:18 -0700 (Sun, 06 May 2007) | 1 line Get asdl code gen working with Python 2.3. Should continue to work with 3.0 ........ r55164 | neal.norwitz | 2007-05-07 00:00:38 -0700 (Mon, 07 May 2007) | 1 line Verify checkins to p3yk (sic) branch go to 3000 list. ........ r55166 | neal.norwitz | 2007-05-07 00:12:35 -0700 (Mon, 07 May 2007) | 1 line Fix this test so it runs again by importing warnings_test properly. ........ r55167 | neal.norwitz | 2007-05-07 01:03:22 -0700 (Mon, 07 May 2007) | 8 lines So long xrange. range() now supports values that are outside -sys.maxint to sys.maxint. floats raise a TypeError. This has been sitting for a long time. It probably has some problems and needs cleanup. Objects/rangeobject.c now uses 4-space indents since it is almost completely new. ........ r55171 | guido.van.rossum | 2007-05-07 10:21:26 -0700 (Mon, 07 May 2007) | 4 lines Fix two tests that were previously depending on significant spaces at the end of a line (and before that on Python 2.x print behavior that has no exact equivalent in 3.0). ........
* Hide list comp variables and support set comprehensionsNick Coghlan2007-04-151-0/+444