Why doesn't input code return 'plants' as in 'Getting Started with Beautiful Soup' text (on page 30) ?

Larry Hudson orgnut at yahoo.com
Sun Jul 12 22:06:16 CEST 2015

On 07/12/2015 05:48 AM, Simon Evans wrote:
> Dear Peter Otten,
> Yes, I have been copying and pasting, as it saves typing. I do get 'indented block' error responses as a small price
 > to pay for the time and energy thus saved.
You CANNOT ignore indenting.
Indenting is NOT optional, it is REQUIRED by Python syntax.
Changing indenting TOTALLY changes the meaning.

 > Also Console seems to reject for 'indented block' reasons better known to itself, copy and
 > pasted lines that it accepts and  are exactly the same on the following line of input.
As above, that is Python syntax.

 > Maybe it is an inbuilt feature of Python's to discourage copy and pasting.
Absolutely not.  As noted above, this is the way Python is defined to work.

      -=- Larry -=-

More information about the Python-list mailing list