Pro Python 3 by J. Burton Browning & Marty Alchin
Author:J. Burton Browning & Marty Alchin
Language: eng
Format: epub
ISBN: 9781484243855
Publisher: Apress
Basic Operations
Even though there are a wide variety of object types available in Python, most of them share a common set of operations. These are considered to be something of a core feature set, representing some of the most common high-level aspects of object manipulation, many of which are just as applicable to simple numbers as they are to many other objects.
One of the simplest and most common needs in all of programming, Python included, is to evaluate an expression to a Boolean value so that it can be used to make simple decisions. Typically this is used in if blocks, but these decisions also come into play when using while, and Boolean operations such as and and or. When Python encounters one of these situations, it relies on the behavior of the __bool__() method to determine the Boolean equivalent of an object.
The __bool__() method , if implemented, accepts just the usual self and must return either True or False. This allows any object to determine whether it should be considered to be true or false in a given expression, using whatever methods or attributes are appropriate:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(7092)
Hello! Python by Anthony Briggs(6668)
Dependency Injection in .NET by Mark Seemann(6546)
The Mikado Method by Ola Ellnestam Daniel Brolund(6458)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(5174)
Grails in Action by Glen Smith Peter Ledbrook(5057)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(4569)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(3343)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(3170)
Practical Vim (for Kathryn Amaral) by Drew Neil(2804)
Cracking the GRE Premium Edition with 6 Practice Tests, 2015 (Graduate School Test Preparation) by Princeton Review(2206)
Kotlin in Action by Dmitry Jemerov(2139)
Learning Java by Patrick Niemeyer & Daniel Leuck(1789)
Learning React: Functional Web Development with React and Redux by Banks Alex & Porcello Eve(1647)
Learn Windows PowerShell in a Month of Lunches by Don Jones(1569)
Mastering Java 9 by Dr. Edward Lavieri(1569)
Learning Concurrency in Python by Elliot Forbes(1348)
PHP 7 Data Structures and Algorithms by Mizanur Rahman(1154)
React Native - Building Mobile Apps with JavaScript by Novick Vladimir(1129)
