Re: with as a reserved word

2007-06-11 Thread BBands
On Jun 11, 12:47 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > estimating what "a lot" is isn't trivial, but it's worth noting that a > search for "lang:python \swith\W" over at google's code search only > brings up about 200 cases, and most of those are found in comments and > string literals. a

Re: with as a reserved word

2007-06-11 Thread Fredrik Lundh
BBands wrote: > I don't have an opinion, pro or con, on this PEP, but I'll bet that it > breaks a lot of code. that's why you get warnings in 2.5, so you have time to update your code; see: http://www.python.org/dev/peps/pep-0005/ estimating what "a lot" is isn't trivial, but it's worth n

Re: with as a reserved word

2007-06-11 Thread BBands
On Jun 11, 11:34 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > if you have Python 2.5, you can try it out yourself: > > >>> dict(with=1) > :1: Warning: 'with' will become a reserved keyword in Python 2.6 > {'with': 1} > > >>> from __future__ import with_statement > >>> dict(with=1) >File ""

Re: with as a reserved word

2007-06-11 Thread Fredrik Lundh
BBands wrote: > I gather that 'with' is on its way to becoming a reserved word. Is > this something that will break? yes. > import Gnuplot > gp = Gnuplot.Gnuplot(debug=1) > data = Gnuplot.Data([1,2,3,4,3,2,3,4,3,2,1], with='linespoints') if you have Python 2.5, you can try it out yourself: >>

Re: with as a reserved word

2007-06-11 Thread Francesco Guerrieri
Within gnuplot you can shorten "with" to "w", don't know if it can work inside a call to Gnuplot.Data() francesco On 6/11/07, BBands <[EMAIL PROTECTED]> wrote: > I gather that 'with' is on its way to becoming a reserved word. Is > this something that will break? > > import Gnuplot > gp = Gnup

Re: with as a reserved word

2007-06-11 Thread kyosohma
On Jun 11, 10:03 am, BBands <[EMAIL PROTECTED]> wrote: > I gather that 'with' is on its way to becoming a reserved word. Is > this something that will break? > > import Gnuplot > gp = Gnuplot.Gnuplot(debug=1) > data = Gnuplot.Data([1,2,3,4,3,2,3,4,3,2,1], with='linespoints') > gp.plot(data) > > >>>

with as a reserved word

2007-06-11 Thread BBands
I gather that 'with' is on its way to becoming a reserved word. Is this something that will break? import Gnuplot gp = Gnuplot.Gnuplot(debug=1) data = Gnuplot.Data([1,2,3,4,3,2,3,4,3,2,1], with='linespoints') gp.plot(data) >>> :3: Warning: 'with' will become a reserved keyword in Python 2.6 http