Why Python does *SLICING* the way it does??
Roy Smith
roy at panix.com
Thu Apr 21 21:35:12 EDT 2005
In article <3cr2cnF6locm6U2 at individual.net>,
Greg Ewing <greg at cosc.canterbury.ac.nz> wrote:
> Roy Smith wrote:
>
> > What would actually be cool is if Python were to support the normal math
> > notation for open or closed intervals.
> >
> > foo = bar (1, 2)
> > foo = bar (1, 2]
> > foo = bar [1, 2)
> > foo = bar [1, 2]
> >
> > That would certainly solve this particular problem, but the cost to the
> > rest of the language syntax would be rather high :-)
>
> Not to mention the sanity of everyone's editors when
> they try to do bracket matching!
I have no doubt that somebody could teach emacs python-mode to correctly
match half-open interval brackets.
More information about the Python-list
mailing list