[Python-ideas] crazy ideas

Aaron Brady castironpi at comcast.net
Tue May 22 20:24:28 CEST 2007


> -----Original Message-----
> From: python-ideas-bounces at python.org [mailto:python-ideas-
> bounces at python.org] On Behalf Of Georg Brandl
> 
> Aaron Brady schrieb:
> > Annotated list callers:
> >
> > q = d[a,b,c] is deque
> >
> > simple sugar for
> >
> > from collections import deque
> > q = deque( a, b, c )
> >
> >
> > might also do
> >
> > s = s[a,b,c]
> >
> > for
> >
> > s = set([a,b,c])
> 
> Would you be happy with {a, b, c}?
> 
> Georg
> 
Yes, impartiality being hard to come by.

Is it a deque or a set?  d{a,b,c} could allow you flexibility.

Don't generalize too -far-, though.  This could be used anywhere, akin to
r"a\bc", but don't allow users to 'cook their own'.  Plenty of room but
needs say so with official support.  Queue.Queue, Collections.Deque,
Collections.DefaultDict, set, UserGeom.Point?[1], that's all I can think of.


[1] r{ p{0,0}, p{10,10} }

FTR for the record, how often it's used today doesn't tell how often it will
be used with convenienter syntax, impartiality still being hard to come by.




More information about the Python-ideas mailing list