close menu
Bookswagon-24x7 online bookstore
close menu
My Account
Home > Computing and Information Technology > Computer programming / software engineering > Web programming > Effective Python: 59 Specific Ways to Write Better Python(Effective Software Development Series)
28%
Effective Python: 59 Specific Ways to Write Better Python(Effective Software Development Series)

Effective Python: 59 Specific Ways to Write Better Python(Effective Software Development Series)

4.7       |  6 Reviews 
5
4
3
2
1

Out of Stock


Premium quality
Premium quality
Bookswagon upholds the quality by delivering untarnished books. Quality, services and satisfaction are everything for us!
Easy Return
Easy return
Not satisfied with this product! Keep it in original condition and packaging to avail easy return policy.
Certified product
Certified product
First impression is the last impression! Address the book’s certification page, ISBN, publisher’s name, copyright page and print quality.
Secure Checkout
Secure checkout
Security at its finest! Login, browse, purchase and pay, every step is safe and secured.
Money back guarantee
Money-back guarantee:
It’s all about customers! For any kind of bad experience with the product, get your actual amount back after returning the product.
On time delivery
On-time delivery
At your doorstep on time! Get this book delivered without any delay.
Notify me when this book is in stock
Add to Wishlist
X

About the Book

Effective Python will help you master a truly “Pythonic” approach to programming, harnessing Python’s full power to write exceptionally robust and well-performing code. Using the concise, scenario-driven style pioneered in Scott Meyers’ best-selling Effective C++, Brett Slatkin brings together 59 Python best practices, tips, and shortcuts, and explains them with realistic code examples. Drawing on years of experience building Python infrastructure at Google, Slatkin uncovers little-known quirks and idioms that powerfully impact code behavior and performance. You’ll learn the best way to accomplish key tasks, so you can write code that’s easier to understand, maintain, and improve. Key features include Actionable guidelines for all major areas of Python 3.x and 2.x development, with detailed explanations and examples Best practices for writing functions that clarify intention, promote reuse, and avoid bugs Coverage of how to accurately express behaviors with classes and objects Guidance on how to avoid pitfalls with metaclasses and dynamic attributes More efficient approaches to concurrency and parallelism Better techniques and idioms for using Python’s built-in modules Tools and best practices for collaborative development Solutions for debugging, testing, and optimisation in order to improve quality and performance

Table of Contents:
Chapter 1: Pythonic Thinking Item 1: Know Which Version of Python You’re Using Item 2: Follow the PEP 8 Style Guide Item 3: Know the Differences Between bytes, str, and unicode Item 4: Write Helper Functions Instead of Complex Expressions Item 5: Know How to Slice Sequences Item 6: Avoid Using start, end, and stride in a Single Slice Item 7: Use List Comprehensions Instead of map and filter Item 8: Avoid More Than Two Expressions in List Comprehensions Item 9: Consider Generator Expressions for Large Comprehensions Item 10: Prefer enumerate Over range Item 11: Use zip to Process Iterators in Parallel Item 12: Avoid else Blocks After for and while Loops Item 13: Take Advantage of Each Block in try/except/else/finally   Chapter 2: Functions Item 14: Prefer Exceptions to Returning None Item 15: Know How Closures Interact with Variable Scope Item 16: Consider Generators Instead of Returning Lists Item 17: Be Defensive When Iterating Over Arguments Item 18: Reduce Visual Noise with Variable Positional Arguments Item 19: Provide Optional Behavior with Keyword Arguments Item 20: Use None and Docstrings to Specify Dynamic Default Arguments Item 21: Enforce Clarity with Keyword-Only Arguments   Chapter 3: Classes and Inheritance Item 22: Prefer Helper Classes Over Bookkeeping with Dictionaries and Tuples Item 23: Accept Functions for Simple Interfaces Instead of Classes Item 24: Use @classmethod Polymorphism to Construct Objects Generically Item 25: Initialize Parent Classes with super Item 26: Use Multiple Inheritance Only for Mix-in Utility Classes Item 27: Prefer Public Attributes Over Private Ones Item 28: Inherit from collections.abc for Custom Container Types   Chapter 4: Metaclasses and Attributes Item 29: Use Plain Attributes Instead of Get and Set Methods Item 30: Consider @property Instead of Refactoring Attributes Item 31: Use Descriptors for Reusable @property Methods Item 32: Use __getattr__, __getattribute__, and __setattr__ for Lazy Attributes Item 33: Validate Subclasses with Metaclasses 1 Item 34: Register Class Existence with Metaclasses Item 35: Annotate Class Attributes with Metaclasses   Chapter 5: Concurrency and Parallelism Item 36: Use subprocess to Manage Child Processes Item 37: Use Threads for Blocking I/O, Avoid for Parallelism Item 38: Use Lock to Prevent Data Races in Threads Item 39: Use Queue to Coordinate Work Between Threads Item 40: Consider Coroutines to Run Many Functions Concurrently Item 41: Consider concurrent.futures for True Parallelism   Chapter 6: Built-in Modules Item 42: Define Function Decorators with functools.wraps Item 43: Consider contextlib and with Statements for Reusable try/finally Behavior Item 44: Make pickle Reliable with copyreg Item 45: Use datetime Instead of time for Local Clocks Item 46: Use Built-in Algorithms and Data Structures Item 47: Use decimal When Precision Is Paramount Item 48: Know Where to Find Community-Built Modules   Chapter 7: Collaboration Item 49: Write Docstrings for Every Function, Class, and Module Item 50: Use Packages to Organize Modules and Provide Stable APIs Item 51: Define a Root Exception to Insulate Callers from APIs Item 52: Know How to Break Circular Dependencies Item 53: Use Virtual Environments for Isolated and Reproducible Dependencies   Chapter 8: Production Item 54: Consider Module-Scoped Code to Configure Deployment Environments Item 55: Use repr Strings for Debugging Output Item 56: Test Everything with unittest Item 57: Consider Interactive Debugging with pdb Item 58: Profile Before Optimizing Item 59: Use tracemalloc to Understand Memory Usage and Leaks   Index


Best Sellers



Product Details
  • ISBN-13: 9780134034287
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Addison Wesley
  • Depth: 19
  • Language: English
  • Returnable: N
  • Spine Width: 14 mm
  • Weight: 440 gr
  • ISBN-10: 0134034287
  • Publisher Date: 19 Mar 2015
  • Binding: Paperback
  • Height: 230 mm
  • No of Pages: 256
  • Series Title: Effective Software Development Series
  • Sub Title: 59 Specific Ways to Write Better Python
  • Width: 176 mm


Similar Products

How would you rate your experience shopping for books on Bookswagon?

Add Photo
Add Photo

Customer Reviews

4.7       |  6 Reviews 
out of (%) reviewers recommend this product
Top Reviews
Rating Snapshot
Select a row below to filter reviews.
5
4
3
2
1
Average Customer Ratings
4.7       |  6 Reviews 
00 of 0 Reviews
Sort by :
Active Filters

00 of 0 Reviews
SEARCH RESULTS
1–2 of 2 Reviews
    BoxerLover2 - 5 Days ago
    A Thrilling But Totally Believable Murder Mystery

    Read this in one evening. I had planned to do other things with my day, but it was impossible to put down. Every time I tried, I was drawn back to it in less than 5 minutes. I sobbed my eyes out the entire last 100 pages. Highly recommend!

    BoxerLover2 - 5 Days ago
    A Thrilling But Totally Believable Murder Mystery

    Read this in one evening. I had planned to do other things with my day, but it was impossible to put down. Every time I tried, I was drawn back to it in less than 5 minutes. I sobbed my eyes out the entire last 100 pages. Highly recommend!


Sample text
Photo of
    Media Viewer

    Sample text
    Reviews
    Reader Type:
    BoxerLover2
    00 of 0 review

    Your review was submitted!
    Effective Python: 59 Specific Ways to Write Better Python(Effective Software Development Series)
    Pearson Education (US) -
    Effective Python: 59 Specific Ways to Write Better Python(Effective Software Development Series)
    Writing guidlines
    We want to publish your review, so please:
    • keep your review on the product. Review's that defame author's character will be rejected.
    • Keep your review focused on the product.
    • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
    • Refrain from mentioning competitors or the specific price you paid for the product.
    • Do not include any personally identifiable information, such as full names.

    Effective Python: 59 Specific Ways to Write Better Python(Effective Software Development Series)

    Required fields are marked with *

    Review Title*
    Review
      Add Photo Add up to 6 photos
      Would you recommend this product to a friend?
      Tag this Book
      Read more
      Does your review contain spoilers?
      What type of reader best describes you?
      I agree to the terms & conditions
      You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

      CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

      These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


      By submitting any content to Bookswagon, you guarantee that:
      • You are the sole author and owner of the intellectual property rights in the content;
      • All "moral rights" that you may have in such content have been voluntarily waived by you;
      • All content that you post is accurate;
      • You are at least 13 years old;
      • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
      You further agree that you may not submit any content:
      • That is known by you to be false, inaccurate or misleading;
      • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
      • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
      • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
      • For which you were compensated or granted any consideration by any unapproved third party;
      • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
      • That contains any computer viruses, worms or other potentially damaging computer programs or files.
      You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


      For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


      All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

      Accept

      New Arrivals



      Inspired by your browsing history


      Your review has been submitted!

      You've already reviewed this product!
      ASK VIDYA