Issue 1452332: Minimalist fix for bug 1441408 (original) (raw)

Issue1452332

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/43047

classification

Title: Minimalist fix for bug 1441408
Type: Stage:
Components: None Versions:

process

Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: logistix, ncoghlan
Priority: normal Keywords: patch

Created on 2006-03-17 13:41 by ncoghlan, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fix-extended-slices.diff ncoghlan,2006-03-17 13:44 Emit None for empty step node in slice
Messages (4)
msg49746 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2006-03-17 13:41
Address bug 1446847 without modifying the AST - simply explicitly set the slice step to None when a second colon is present but no step expression is provided.
msg49747 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2006-03-17 13:44
Logged In: YES user_id=1038590 The identifier in the description is for the proposed patch that modifies the AST - title has been fixed to refer to actual bug report (1441408)
msg49748 - (view) Author: Grant Olson (logistix) Date: 2006-03-17 14:29
Logged In: YES user_id=699438 Does this generate the right bytecode if you're not using extended notation (a[:])? If so, it's better than my patch.
msg49749 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2006-03-17 18:00
Logged In: YES user_id=1038590 It does (confirmed by comparing dis.dis() output from my patched build against Python 2.4). This makes sense, since the generation of the implicit None step is inside the "sliceop" guard, so its only executed when the second colon is present. Checked in as rev 43121.
History
Date User Action Args
2022-04-11 14:56:16 admin set github: 43047
2006-03-17 13:41:01 ncoghlan create