You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
702 B

From: fredrik at pythonware.com (Fredrik Lundh)
Date: Tue, 13 Apr 1999 07:21:15 GMT
Subject: role of semilcolon
References: <slrn7h4q72.mou.rasumner@bach.wisdom.weizmann.ac.il> <Pine.LNX.4.10.9904121900560.12527-100000@kenny.comstar.net>
Message-ID: <00f401be857f$ff063410$f29b12c2@pythonware.com>
X-UID: 131
Andy Dustman wrote:
> a=1;b=2;b=3
>
> is the same as:
>
> a=1
> b=2
> b=3
>
> But a Pythonism you may want to adapt is:
>
> a,b,c = 1,2,3
that's a somewhat dubious pydiom: the semicolon
variant is about twice as fast.
(and unless you use the -O option, the semicolon
form is also faster the one-assignement-per-line
form...)
</F>