On 3/4/2011 12:07 AM, Chris Rebert wrote:
On Thu, Mar 3, 2011 at 9:05 PM, Dan Strombergdrsali...@gmail.com wrote:
On Thu, Mar 3, 2011 at 8:48 PM, Chris Rebertc...@rebertia.com wrote:
On Thu, Mar 3, 2011 at 8:41 PM, monkeys pawmon...@joemoney.net wrote:
Does python have an analogy to c/perl
Chris Rebert c...@rebertia.com wrote in message
news:mailman.596.1299215244.1189.python-l...@python.org...
On Thu, Mar 3, 2011 at 9:05 PM, Dan Stromberg drsali...@gmail.com wrote:
On Thu, Mar 3, 2011 at 8:48 PM, Chris Rebert c...@rebertia.com wrote:
On Thu, Mar 3, 2011 at 8:41 PM, monkeys
On Thu, Mar 3, 2011 at 8:41 PM, monkeys paw mon...@joemoney.net wrote:
Does python have an analogy to c/perl incrementer?
e.g.
i = 0
i++
i += 1
If you're doing this for a list index, use enumerate() instead.
Regards,
Chris
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Mar 3, 2011 at 8:48 PM, Chris Rebert c...@rebertia.com wrote:
On Thu, Mar 3, 2011 at 8:41 PM, monkeys paw mon...@joemoney.net wrote:
Does python have an analogy to c/perl incrementer?
e.g.
i = 0
i++
i += 1
If you're doing this for a list index, use enumerate() instead.
On Thu, Mar 3, 2011 at 9:05 PM, Dan Stromberg drsali...@gmail.com wrote:
On Thu, Mar 3, 2011 at 8:48 PM, Chris Rebert c...@rebertia.com wrote:
On Thu, Mar 3, 2011 at 8:41 PM, monkeys paw mon...@joemoney.net wrote:
Does python have an analogy to c/perl incrementer?
e.g.
i = 0
i++
i
On Thu, Mar 3, 2011 at 9:07 PM, Chris Rebert c...@rebertia.com wrote:
On Thu, Mar 3, 2011 at 9:05 PM, Dan Stromberg drsali...@gmail.com wrote:
On Thu, Mar 3, 2011 at 8:48 PM, Chris Rebert c...@rebertia.com wrote:
On Thu, Mar 3, 2011 at 8:41 PM, monkeys paw mon...@joemoney.net
wrote:
Does
On Dec 8, 7:58 pm, Karthik Gurusamy [EMAIL PROTECTED] wrote:
I see python doesn't have ++ or -- operators unlike say, C.
I read some reasonings talking about immutable scalars and using ++/--
doesn't make much sense in python (not sure if ++i is that far-fetched
compared to the allowed i += 1)
On Sat, 08 Dec 2007 16:58:25 -0800, Karthik Gurusamy wrote:
Why are the following accepted even without a warning about syntax
error?
(I would expect the python grammar should catch these kind of syntax
errors)
n = 1
2 * + n
2
n += 1
n
2
++n
2
There is no syntax error. It is
--- Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
On Sat, 08 Dec 2007 16:58:25 -0800, Karthik Gurusamy
wrote:
Why are the following accepted even without a
warning about syntax
error?
(I would expect the python grammar should catch
these kind of syntax
errors)
2 * + n