12.07.2015 Views

Is Python a

Is Python a

Is Python a

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5. Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93<strong>Python</strong> Numeric Types 93Numeric Literals 94Built-in Numeric Tools and Extensions 95<strong>Python</strong> Expression Operators 96Mixed Operators Follow Operator Precedence 97Parentheses Group Subexpressions 97Mixed Types Are Converted Up 97Preview: Operator Overloading 98Numbers in Action 99Variables and Basic Expressions 99Numeric Display Formats 100Division: Classic, Floor, and True 102Bitwise Operations 103Long Integers 103Complex Numbers 104Hexadecimal and Octal Notation 105Other Built-in Numeric Tools 106Other Numeric Types 107Decimal Numbers 107Sets 108Booleans 109Third-Party Extensions 110Chapter Summary 110Brain Builder 111Chapter Quiz 111Quiz Answers 1116. The Dynamic Typing Interlude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112The Case of the Missing Declaration Statements 112Variables, Objects, and References 112Types Live with Objects, Not Variables 114Objects Are Garbage-Collected 115Shared References 116Shared References and In-Place Changes 118Shared References and Equality 119Dynamic Typing <strong>Is</strong> Everywhere 121Table of Contents | xi

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!