+= and =+

Grant Edwards grant.b.edwards at gmail.com
Wed Sep 13 10:17:55 EDT 2017


On 2017-09-13, Andrej Viktorovich <viktorovichandrej at gmail.com> wrote:

> I have done mistake while trying to increment int
>
> i=1
> i=+
>
> this left i unchangeable and I got no error.

I doubt it.

Python 2.7.12 (default, Jan  3 2017, 10:08:10) 
[GCC 4.9.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> i=1
>>> i=+
  File "<stdin>", line 1
    i=+
      ^
SyntaxError: invalid syntax



Python 3.4.5 (default, Jan  3 2017, 10:09:58) 
[GCC 4.9.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> i=1
>>> i=+
  File "<stdin>", line 1
    i=+
      ^
SyntaxError: invalid syntax
>>> 




-- 
Grant Edwards               grant.b.edwards        Yow! It's NO USE ... I've
                                  at               gone to "CLUB MED"!!
                              gmail.com            




More information about the Python-list mailing list