Python 3 object-oriented programming unleash the power of Python 3 objects
Unleash the power of Python 3 objects About This Book Stop writing scripts and start architecting programs Learn the latest Python syntax and libraries A practical, hands-on tutorial that teaches you all about abstract design patterns and how to implement them in Python 3 Who This Book Is For If you...
Otros Autores: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Birmingham, [England] ; Mumbai, [India] :
Packt Publishing
2015.
|
Edición: | 2nd ed |
Colección: | Community experience distilled.
|
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009629692306719 |
Tabla de Contenidos:
- ""Cover""; ""Copyright""; ""Credits""; ""About the Author""; ""About the Reviewers""; ""www.PacktPub.com""; ""Introduction tothe second edition""; ""Table of Contents""; ""Preface""; ""Chapter 1: Object-oriented Design""; ""Introducing object-oriented""; ""Objects and classes""; ""Specifying attributes and behaviors""; ""Data describes objects""; ""Behaviors are actions""; ""Hiding details and creating the public interface""; ""Composition""; ""Inheritance""; ""Inheritance provides abstraction""; ""Multiple inheritance""; ""Case study""; ""Exercises""; ""Summary""
- ""Chapter 2: Objects in Python""""Creating Python classes""; ""Adding attributes""; ""Making it do something""; ""Talking to yourself""; ""More arguments""; ""Initializing the object""; ""Explaining yourself""; ""Modules and packages""; ""Organizing the modules""; ""Absolute imports""; ""Relative imports""; ""Organizing module contents""; ""Who can access my data?""; ""Third-party libraries""; ""Case study""; ""Exercises""; ""Summary""; ""Chapter 3: When Objects Are Alike""; ""Basic inheritance""; ""Extending built-ins""; ""Overriding and super""; ""Multiple inheritance""
- ""The diamond problem""""Different sets of arguments""; ""Polymorphism""; ""Abstract base classes""; ""Using an abstract base class""; ""Creating an abstract base class""; ""Demystifying the magic""; ""Case study""; ""Exercises""; ""Summary""; ""Chapter 4: Expecting the Unexpected""; ""Raising exceptions""; ""Raising an exception""; ""The effects of an exception""; ""Handling exceptions""; ""The Exception hierarchy""; ""Defining our own exceptions""; ""Case study""; ""Exercises""; ""Summary""; ""Chapter 5: When to Use Object-oriented Programming""; ""Treat objects as objects""
- ""Adding behavior to class data with properties""""Properties in detail""; ""Decorators - another way to create properties""; ""Deciding when to use properties""; ""Manager objects""; ""Removing duplicate code""; ""In practice""; ""Case study""; ""Exercises""; ""Summary""; ""Chapter 6: Python Data Structures""; ""Empty objects""; ""Tuples and named tuples""; ""Named tuples""; ""Dictionaries""; ""Dictionary use cases""; ""Using defaultdict""; ""Counter""; ""Lists""; ""Sorting lists""; ""Sets""; ""Extending built-ins""; ""Queues""; ""FIFO queues""; ""LIFO queues""; ""Priority queues""
- ""Case study""""Exercises""; ""Summary""; ""Chapter 7: Python Object-oriented Shortcuts""; ""Python built-in functions""; ""The len() function""; ""Reversed""; ""Enumerate""; ""File I/O""; ""Placing it in context""; ""An alternative to method overloading""; ""Default arguments""; ""Variable argument lists""; ""Unpacking arguments""; ""Functions are objects too""; ""Using functions as attributes""; ""Callable objects""; ""Case study""; ""Exercises""; ""Summary""; ""Chapter 8: Strings and Serialization""; ""Strings""; ""String manipulation""; ""String formatting""; ""Escaping braces""
- ""Keyword arguments""