Python vs. Ruby

Andrew Dalke adalke at mindspring.com
Wed Jan 8 22:04:38 CET 2003


Stuart D. Gathman wrote:
> The smalltalk operator ';' is already taken in Python, but let
> me make a quick stab at a Python substitute:
> 
>   aList.sort();.reverse()	# aList.sort(); aList.reverse()
> 
> A statement cannot begin with '.', so ';.' means to invoke another method
> on the same object.

Skipping the discussion for the syntax,

   [].sort();.1

is legal, so it is posible for a statement to begin with '.'.

Personally, I don't want this sort of chaining.

					Andrew
					dalke at dalkescientific.com





More information about the Python-list mailing list