[Python-ideas] Integrate some itertools into the Python syntax

Chris Angelico rosuav at gmail.com
Wed Mar 23 06:37:57 EDT 2016


On Wed, Mar 23, 2016 at 9:04 PM, Michel Desmoulin
<desmoulinmichel at gmail.com> wrote:
>> (Whether or not to make slice notation usable outside subscript
>> operations could then be tackled as an independent question)
>>
>> For itertools.chain, it may make sense to simply promote it to the builtins.
>
> Same problem as with new keywords : it can be a problem with people
> using chain as a var name.
>

Less of a problem though - it'd only be an issue for people who (a)
use chain as a var name, and (b) want to use the new shorthand. Their
code will continue to work identically with itertools.chain (or not
using it at all). With a new keyword, their code would instantly fail.

ChrisA


More information about the Python-ideas mailing list