$ python Python 2.5.2 (r252:60911, Nov 14 2008, 19:46:32) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import urllib;from BeautifulSoup import BeautifulSoup;data = BeautifulSoup(urllib.urlopen("http://www.google.com";));print data.title.string
I consider putting multiple statements on one line like that to be bordering on code obfuscation.
Nick Stockton----- Original Message ----- From: "Octavian Rasnita" <orasnita@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx> Sent: Sunday, December 07, 2008 3:32 PM Subject: Re: python examples
The first code that should print an expression on more lines doesn't do this, but just prints it in a single line escaping the end of line char with \.And the second code that in perl is done in the command line, here it needs a full program with more lines. So you were not right when you told that you can write a full program in the command line, without needing to press enter more than once.Am I right? Octavian
__________View the list's information and change your settings at //www.freelists.org/list/programmingblind