classification
Title: Allow Empty Subscript List Without Parentheses
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, noamr (2)
Priority: normal Keywords patch

Created on 2006-06-09 14:47 by noamr, last changed 2006-06-18 19:30 by georg.brandl.

Files
File name Uploaded Description Edit Remove
emptysubscriptlist.diff noamr, 2006-06-09 14:47 Diff against current SVN
emptysubscriptlist.diff noamr, 2006-06-17 19:18 Diff, second version.
Messages (3)
msg50446 - (view) Author: Noam Raphael (noamr) Date: 2006-06-09 14:47
This is a reference implementation of PEP XXX, which
makes writing "x[]" equivalent to writing "x[()]".

It passes the Python test suite, but currently doesn't
provide additional tests or documentation.

The attached diff doesn't include changes to
auto-generated files.
msg50447 - (view) Author: Noam Raphael (noamr) Date: 2006-06-17 19:18
Logged In: YES 
user_id=679426

Attached is an improved patch, which does exactly the same
thing but with less code. It shows that, at least from the
implementation's point of view, an empty tuple for an empty
subscript list works like an n-tuple for an n-sized
subscript list.

You can also see it in http://python.pastebin.com/715221
msg50448 - (view) Author: Georg Brandl (georg.brandl) Date: 2006-06-18 19:30
Logged In: YES 
user_id=849994

Rejected per Guido's pronouncement on python-dev.
History
Date User Action Args
2006-06-09 14:47:49noamrcreate