The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
[Originally posted by rbickers]

I'm very new to Python and this book has been great so far (I'm on Chapter 7).

However, here are some errors I found:

Page 34: print "The constant e is: ", e, " and ... is: ", x
The output only shows a single space around the "e" and "x" values, but two
will actually print.

Page 67: x[[0] should be x[0]

Page 68: x = x[:1] should be x = x[:-1] to chop off the '
' from 'Goodbye

Page 68: x = "Hello" + "World" results in 'HelloWorld', not 'Hello World'

Page 73: The closing ) in string.atoi('123456', 6 is hanging out way at the
right margin (I thought it was missing altogether at first glance)

Regardless of these little errors, thanks for a great book!

import-bot (20211) [Avatar] Offline
Re: A few errors
[Originally posted by rbickers]

I found a couple more in Chapter 7:

Page 77: 'print text' results in ,olleH instead of olleH,

Page 80: print "%{pi}.2f - %{pi}.4f - %(e).2f" % dict
The text indicates that parentheses should be used, but this shows curly
braces around pi, which doesn't work as I've discovered.

import-bot (20211) [Avatar] Offline
Re: A few errors
[Originally posted by daryl harms]

Hi Ron,

Thanks for catching these. I'll have them added to the errata page.

I'm glad to see you are working through the examples as that is the way to
learn. Not so happy that there are these errors there for you to find,