Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Open Source > BOOK: Python Projects
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Python Projects
This is the forum to discuss the Wrox book Python Projects Laura Cassell, Alan Gauld; ISBN: 978-1-118-90866-2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Python Projects section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 21st, 2015, 06:08 PM
Wrox Author
Points: 109, Level: 2
Points: 109, Level: 2 Points: 109, Level: 2 Points: 109, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2015
Location: Stirling, Scotland
Posts: 22
Thanks: 0
Thanked 3 Times in 3 Posts
Default Problem in listbits.py (chapter 1)

Alex Kleider has highlighted a problem with the listbits() function in bitmask.py as described on pages 40/41. The function using default arguments does not print the last bit.

The corrected code should read:

def listbits(self, start=0,end=None):
if end: end = end if end < 0 else end+2
return [int(c) for c in bin(self)[start+2:end]]

I've submitted a corrected file to Wrox and hopefully it will soon appear
on the download site.

Thanks again to Alex and apologies for the slip up.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 1 - bits.py problems saltycraig BOOK: Python Projects 5 October 17th, 2015 12:39 PM
problem on Chapter 5 stzd8 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 November 25th, 2006 06:10 PM
Chapter 2 problem stzd8 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 November 6th, 2006 06:08 PM



All times are GMT -4. The time now is 02:00 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.