semicolon at end of python's statements

Chris Angelico rosuav at gmail.com
Wed Aug 28 20:31:17 EDT 2013


On Thu, Aug 29, 2013 at 10:18 AM, Mohsen Pahlevanzadeh
<mohsen at pahlevanzadeh.org> wrote:
> Dear all,
>
> I'm C++ programmer and unfortunately put semicolon at end of my
> statements in python.
>
> Quesion:
> What's really defferences between putting semicolon and don't put?

Very little. Putting the semicolon makes you look like a C programmer
who's new to Python; omitting it makes you look like you actually
understand Python :)

As a C and C++ programmer myself, I know where you're coming from, but
putting semicolons at the ends of Python statements is as useless as
putting ((((lots of (((irritating (((superfluous
(((parentheses))))))))))))) in your C++ code. The parser won't mind,
but subsequent programmers will wonder what these unnecessary
syntactic elements are for.

ChrisA



More information about the Python-list mailing list