Python 3 object oriented programming: harness the power of Python 3 objects
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Birmingham [u.a.]
Packt Publ.
2010
|
Schriftenreihe: | Community experience distilled
Packt open source |
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | V, 388 S. graph. Darst. |
ISBN: | 1849511268 9781849511261 |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV036756828 | ||
003 | DE-604 | ||
005 | 20101126 | ||
007 | t | ||
008 | 101104s2010 d||| |||| 00||| eng d | ||
020 | |a 1849511268 |c : EUR 30,99 |9 1-8495-1126-8 | ||
020 | |a 9781849511261 |c : EUR 30,99 |9 978-1-8495-1126-1 | ||
035 | |a (OCoLC)802342008 | ||
035 | |a (DE-599)GBV630508062 | ||
040 | |a DE-604 |b ger | ||
041 | 0 | |a eng | |
049 | |a DE-83 |a DE-Aug4 | ||
084 | |a ST 250 |0 (DE-625)143626: |2 rvk | ||
100 | 1 | |a Phillips, Dusty |e Verfasser |4 aut | |
245 | 1 | 0 | |a Python 3 object oriented programming |b harness the power of Python 3 objects |c Dusty Phillips |
246 | 1 | 3 | |a Python 3 |
264 | 1 | |a Birmingham [u.a.] |b Packt Publ. |c 2010 | |
300 | |a V, 388 S. |b graph. Darst. | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
490 | 0 | |a Community experience distilled | |
490 | 0 | |a Packt open source | |
650 | 0 | 7 | |a Python 3.x |0 (DE-588)7692360-5 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Objektorientierte Programmierung |0 (DE-588)4233947-9 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a Python 3.x |0 (DE-588)7692360-5 |D s |
689 | 0 | 1 | |a Objektorientierte Programmierung |0 (DE-588)4233947-9 |D s |
689 | 0 | |5 DE-604 | |
856 | 4 | 2 | |m GBV Datenaustausch |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=020673985&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-020673985 |
Datensatz im Suchindex
_version_ | 1804143422486872064 |
---|---|
adam_text | IMAGE 1
PYTHON 3 OBJECT ORIENTED PROGRAMMING
HARNESS THE POWER OF PYTHON 3 OBJECTS
DUSTY PHILLIPS
_ C^ ^
T LS L OPEN SOURCE6* [S* **! IV 1 I N , I1 L
BIRMINGHAM - MUMBAI
1 I COMMUNITY EXPERIENCE DISTILLED
PUBLISHING
IMAGE 2
TABLE OF CONTENTS
PREFACE 1
CHAPTER 1: OBJECT-ORIENTED DESIGN 7
OBJECT-ORIENTED? 7
OBJECTS AND CLASSES 9
SPECIFYING ATTRIBUTES AND BEHAVIORS 11
DATA DESCRIBES OBJECTS 11
BEHAVIORS ARE ACTIONS 13
HIDING DETAILS AND CREATING THE PUBLIC INTERFACE 14
COMPOSITION AND INHERITANCE 17
INHERITANCE 20
INHERITANCE PROVIDES ABSTRACTION 22
MULTIPLE INHERITANCE 23
CASE STUDY 24
EXERCISES 31
SUMMARY 32
CHAPTER 2: OBJECTS IN PYTHON 33
CREATING PYTHON CLASSES 33
ADDING ATTRIBUTES 35
MAKING IT DO SOMETHING 35
INITIALIZING THE OBJECT 38
EXPLAINING YOURSELF 41
MODULES AND PACKAGES 43
ORGANIZING THE MODULES 45
ABSOLUTE IMPORTS 46
RELATIVE IMPORTS 47
WHO CAN ACCESS MY DATA? 50
CASE STUDY 53
EXERCISES 61
SUMMARY 62
IMAGE 3
TABLE OF CONTENTS
CHAPTER 3: WHEN OBJECTS ARE ALIKE 63
BASIC INHERITANCE 63
EXTENDING BUILT-INS 66
OVERRIDING AND SUPER 67
MULTIPLE INHERITANCE 68
THE DIAMOND PROBLEM 71
DIFFERENT SETS OF ARGUMENTS 75
POLYMORPHISM 78
CASE STUDY 80
EXERCISES 93
SUMMARY 94
CHAPTER 4: EXPECTING THE UNEXPECTED 95
RAISING EXCEPTIONS 95
RAISING AN EXCEPTION 98
WHAT HAPPENS WHEN AN EXCEPTION OCCURS? 99
HANDLING EXCEPTIONS 101
EXCEPTION HIERARCHY 106
DEFINING OUR OWN EXCEPTIONS 108
EXCEPTIONS AREN T EXCEPTIONAL 109
CASE STUDY 112
EXERCISES 122
SUMMARY 123
CHAPTER 5: WHEN TO USE OBJECT-ORIENTED PROGRAMMING 125 TREAT OBJECTS AS
OBJECTS 125
USING PROPERTIES TO ADD BEHAVIOR TO CLASS DATA 129
HOW IT WORKS 132
DECORATORS: ANOTHER WAY TO CREATE PROPERTIES 134
WHEN SHOULD WE USE PROPERTIES? 135
MANAGING OBJECTS 137
REMOVING DUPLICATE CODE 140
IN PRACTICE 142
OR WE CAN USE COMPOSITION 145
CASE STUDY 147
EXERCISES 154
SUMMARY 156
CHAPTER 6: PYTHON DATA STRUCTURES 157
EMPTY OBJECTS 157
TUPLES AND NAMED TUPLES 159
NAMED TUPLES 161
DICTIONARIES 162
IMAGE 4
TABLE OF CONTENTS
WHEN SHOULD WE USE DICTIONARIES? 166
USING DEFAULTDICT 166
LISTS 168
SORTING LISTS 171
SETS 173
EXTENDING BUILT-INS 177
CASE STUDY 182
EXERCISES 188
SUMMARY 189
CHAPTER 7: PYTHON OBJECT-ORIENTED SHORTCUTS 191
PYTHON BUILT-IN FUNCTIONS 191
LEN 192
REVERSED 192
ENUMERATE
193
ZIP 194
OTHER FUNCTIONS 196
COMPREHENSIONS 197
LIST COMPREHENSIONS 198
SET AND DICTIONARY COMPREHENSIONS 200
GENERATOR EXPRESSIONS 201
GENERATORS 203
AN ALTERNATIVE TO METHOD OVERLOADING 205
DEFAULT ARGUMENTS 207
VARIABLE ARGUMENT LISTS 208
UNPACKING ARGUMENTS 212
FUNCTIONS ARE OBJECTS TOO 213
USING FUNCTIONS AS ATTRIBUTES 218
CALLABLE OBJECTS 219
CASE STUDY 220
EXERCISES 224
SUMMARY 225
CHAPTER 8: PYTHON DESIGN PATTERNS 1 227
DESIGN PATTERNS 227
DECORATOR PATTERN 229
DECORATOR EXAMPLE 230
DECORATORS IN PYTHON 233
OBSERVER PATTERN 235
OBSERVER EXAMPLE 235
STRATEGY PATTERN 237
STRATEGY EXAMPLE 238
IMAGE 5
TABLE OF CONTENTS
STRATEGY IN PYTHON 240
STATE PATTERN 240
STATE EXAMPLE 241
STATE VERSUS STRATEGY 247
SINGLETON PATTERN 247
SINGLETON IMPLEMENTATION 248
MODULE VARIABLES CAN MIMIC SINGLETONS 249
TEMPLATE PATTERN 251
TEMPLATE EXAMPLE 252
EXERCISES 255
SUMMARY 256
CHAPTER 9: PYTHON DESIGN PATTERNS II 257
ADAPTER PATTERN 257
FACADE PATTERN 260
FLYWEIGHT PATTERN 263
COMMAND PATTERN 267
ABSTRACT FACTORY PATTERN
271
COMPOSITE PATTERN 276
EXERCISES 280
SUMMARY 281
CHAPTER 10: FILES AND STRINGS 283
STRINGS 283
STRING MANIPULATION 284
STRING FORMATTING 287
ESCAPING BRACES 288
KEYWORD ARGUMENTS 288
CONTAINER LOOKUPS 289
OBJECT LOOKUPS
291
MAKING IT LOOK RIGHT 291
STRINGS ARE UNICODE 294
CONVERTING BYTES TO TEXT 295
CONVERTING TEXT TO BYTES 296
MUTABLE BYTE STRINGS 297
FILELO 299
PLACING IT IN CONTEXT 301
FAKING FILES 302
STORING OBJECTS 303
CUSTOMIZING PICKLES 305
SERIALIZING WEB OBJECTS 308
EXERCISES 310
SUMMARY 312
IMAGE 6
TABLE OFCONTENTS
CHAPTER 11: TESTING OBJECT-ORIENTED PROGRAMS 313
WHY TEST? 313
TEST-DRIVEN DEVELOPMENT 315
UNIT TESTING 316
ASSERTION METHODS 318
ADDITIONAL ASSERTION METHODS IN PYTHON 3.1 319
REDUCING BOILERPLATE AND CLEANING UP 320
ORGANIZING AND RUNNING TESTS 322
IGNORING BROKEN TESTS 323
TESTING WITH PY.TEST 324
ONE WAY TO DO SETUP AND CLEANUP 326
A COMPLETELY DIFFERENT WAY TO SET UP VARIABLES 329
TEST SKIPPING WITH PY.TEST 333
PY.TEST EXTRAS 335
HOW MUCH TESTING IS ENOUGH? 336
CASE STUDY 339
IMPLEMENTING IT 340
EXERCISES 345
SUMMARY 346
CHAPTER 12: COMMON PYTHON 3 LIBRARIES 347
DATABASE ACCESS 348
INTRODUCING SQLAICHEMY 349
ADDING AND QUERYING OBJECTS 351
SQL EXPRESSION LANGUAGE 352
PRETTY USER INTERFACES 353
TKLNTER 354
PYQT 358
CHOOSING A GUI TOOLKIT 361
XML 362
ELEMENTTREE 362
CONSTRUCTING XML DOCUMENTS 366
IXML 366
CHERRYPY 368
A FULL WEB STACK? 370
EXERCISES 377
SUMMARY 378
INDEX 379
|
any_adam_object | 1 |
author | Phillips, Dusty |
author_facet | Phillips, Dusty |
author_role | aut |
author_sort | Phillips, Dusty |
author_variant | d p dp |
building | Verbundindex |
bvnumber | BV036756828 |
classification_rvk | ST 250 |
ctrlnum | (OCoLC)802342008 (DE-599)GBV630508062 |
discipline | Informatik |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01508nam a2200385 c 4500</leader><controlfield tag="001">BV036756828</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20101126 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">101104s2010 d||| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">1849511268</subfield><subfield code="c">: EUR 30,99</subfield><subfield code="9">1-8495-1126-8</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781849511261</subfield><subfield code="c">: EUR 30,99</subfield><subfield code="9">978-1-8495-1126-1</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)802342008</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)GBV630508062</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-83</subfield><subfield code="a">DE-Aug4</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 250</subfield><subfield code="0">(DE-625)143626:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Phillips, Dusty</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Python 3 object oriented programming</subfield><subfield code="b">harness the power of Python 3 objects</subfield><subfield code="c">Dusty Phillips</subfield></datafield><datafield tag="246" ind1="1" ind2="3"><subfield code="a">Python 3</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Birmingham [u.a.]</subfield><subfield code="b">Packt Publ.</subfield><subfield code="c">2010</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">V, 388 S.</subfield><subfield code="b">graph. Darst.</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">Community experience distilled</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">Packt open source</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Python 3.x</subfield><subfield code="0">(DE-588)7692360-5</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Objektorientierte Programmierung</subfield><subfield code="0">(DE-588)4233947-9</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Python 3.x</subfield><subfield code="0">(DE-588)7692360-5</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2="1"><subfield code="a">Objektorientierte Programmierung</subfield><subfield code="0">(DE-588)4233947-9</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">GBV Datenaustausch</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=020673985&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-020673985</subfield></datafield></record></collection> |
id | DE-604.BV036756828 |
illustrated | Illustrated |
indexdate | 2024-07-09T22:47:25Z |
institution | BVB |
isbn | 1849511268 9781849511261 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-020673985 |
oclc_num | 802342008 |
open_access_boolean | |
owner | DE-83 DE-Aug4 |
owner_facet | DE-83 DE-Aug4 |
physical | V, 388 S. graph. Darst. |
publishDate | 2010 |
publishDateSearch | 2010 |
publishDateSort | 2010 |
publisher | Packt Publ. |
record_format | marc |
series2 | Community experience distilled Packt open source |
spelling | Phillips, Dusty Verfasser aut Python 3 object oriented programming harness the power of Python 3 objects Dusty Phillips Python 3 Birmingham [u.a.] Packt Publ. 2010 V, 388 S. graph. Darst. txt rdacontent n rdamedia nc rdacarrier Community experience distilled Packt open source Python 3.x (DE-588)7692360-5 gnd rswk-swf Objektorientierte Programmierung (DE-588)4233947-9 gnd rswk-swf Python 3.x (DE-588)7692360-5 s Objektorientierte Programmierung (DE-588)4233947-9 s DE-604 GBV Datenaustausch application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=020673985&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Phillips, Dusty Python 3 object oriented programming harness the power of Python 3 objects Python 3.x (DE-588)7692360-5 gnd Objektorientierte Programmierung (DE-588)4233947-9 gnd |
subject_GND | (DE-588)7692360-5 (DE-588)4233947-9 |
title | Python 3 object oriented programming harness the power of Python 3 objects |
title_alt | Python 3 |
title_auth | Python 3 object oriented programming harness the power of Python 3 objects |
title_exact_search | Python 3 object oriented programming harness the power of Python 3 objects |
title_full | Python 3 object oriented programming harness the power of Python 3 objects Dusty Phillips |
title_fullStr | Python 3 object oriented programming harness the power of Python 3 objects Dusty Phillips |
title_full_unstemmed | Python 3 object oriented programming harness the power of Python 3 objects Dusty Phillips |
title_short | Python 3 object oriented programming |
title_sort | python 3 object oriented programming harness the power of python 3 objects |
title_sub | harness the power of Python 3 objects |
topic | Python 3.x (DE-588)7692360-5 gnd Objektorientierte Programmierung (DE-588)4233947-9 gnd |
topic_facet | Python 3.x Objektorientierte Programmierung |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=020673985&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT phillipsdusty python3objectorientedprogrammingharnessthepowerofpython3objects AT phillipsdusty python3 |