Opened 18 years ago
Closed 18 years ago
#16 closed enhancement (fixed)
Support generator expressions in expressions
Reported by: | cmlenz | Owned by: | mgood |
---|---|---|---|
Priority: | minor | Milestone: | 0.3 |
Component: | Expression evaluation | Version: | |
Keywords: | Cc: |
Change History (6)
comment:1 Changed 18 years ago by cmlenz
- Milestone 0.2 deleted
comment:2 Changed 18 years ago by mgood
- Milestone set to 0.3
- Owner changed from cmlenz to mgood
- Status changed from new to assigned
comment:3 Changed 18 years ago by mgood
- Resolution set to fixed
- Status changed from assigned to closed
This was implemented in [248].
comment:4 Changed 18 years ago by cmlenz
- Resolution fixed deleted
- Status changed from closed to reopened
The test case gives me a “Bus Error” on Python 2.5. Haven't looked into it any further yet.
comment:5 Changed 18 years ago by cmlenz
Here's the dissambled bytecode that is generated for the expression:
list(n for n in numbers if n < 2)
The bytecode looks exactly the same for Python 2.4 and Python 2.5b3, but crashes in the latter:
1 0 LOAD_NAME 0 (_lookup_name) 3 LOAD_NAME 1 (data) 6 LOAD_CONST 1 ('list') 9 CALL_FUNCTION 2 12 LOAD_CONST 2 (<code object <lambda.0> at 0xb9b60, file "<string>", line 1>) 15 MAKE_FUNCTION 0 18 LOAD_NAME 0 (_lookup_name) 21 LOAD_NAME 1 (data) 24 LOAD_CONST 3 ('numbers') 27 CALL_FUNCTION 2 30 GET_ITER 31 CALL_FUNCTION 1 34 CALL_FUNCTION 1 37 RETURN_VALUE
comment:6 Changed 18 years ago by cmlenz
- Resolution set to fixed
- Status changed from reopened to closed
I've just installed Python 2.5 RC1, and it looks like the bug has been fixed.
Note: See
TracTickets for help on using
tickets.
Ok, I've got this one.