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.

Author steven.daprano
Recipients Solomon Ucko, benjamin.peterson, brett.cannon, steven.daprano, yselivanov
Date 2018-12-24.06:37:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1545633470.07.0.0770528567349.issue35575@roundup.psfhosted.org>
In-reply-to
Content
These proposals probably should be discussed on Python-Ideas first. You should also familiarize yourself with previous proposals to enhance range, such as

https://mail.python.org/pipermail/python-ideas/2018-November/054510.html

and the bug report #35200

For what it is worth, Guido was generally (slightly) opposed to "constant bool parameters", functions that take a parameter which is generally given as a literal True/False flag. That's often (not always) a design smell. I agree with him, so I would be very wary about adding not one but two such constant bool parameters.

Especially for such a trivial enhancement. There's nothing in the `inc_start=True, inc_stop=False` functionality which can't be more easily done by simply adding one to the appropriate range arguments:

    # same as inc_start=False, inc_stop=True but easier
    range(start+1, end+1)  


You say:

"a mix of round parentheses and square brackets could be allowed"


but I think such a proposal would run foul of the requirement that Python's grammar be no more complex than LL(1). 

(Someone will correct me if I'm wrong.)
History
Date User Action Args
2018-12-24 06:37:51steven.dapranosetrecipients: + steven.daprano, brett.cannon, benjamin.peterson, yselivanov, Solomon Ucko
2018-12-24 06:37:50steven.dapranosetmessageid: <1545633470.07.0.0770528567349.issue35575@roundup.psfhosted.org>
2018-12-24 06:37:50steven.dapranolinkissue35575 messages
2018-12-24 06:37:49steven.dapranocreate