semicolon at end of python's statements

Duncan Booth duncan.booth at invalid.invalid
Thu Sep 5 07:33:50 EDT 2013


Chris Angelico <rosuav at gmail.com> wrote:

> 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
> 

Someone I knew actually used these definitions when writing C in a Pascalish, Algol68ish 
style (if I remembered them correctly):

#define IF if(((
#define AND ))&&((
#define OR )||(
#define THEN ))){
#define ELSE }else{
#define FI }


-- 
Duncan Booth http://kupuguy.blogspot.com



More information about the Python-list mailing list