Beginning Python - From Novice to Professional

Beginning Python - From Novice to Professional Beginning Python - From Novice to Professional

16.01.2014 Views

■INDEX 587 initialization 38 naming functions 370 inplace parameter fileinput module 220 input compared to raw_input 26 input function 548, 560 fileinput module 219 insert method lists 45 inspect module 156, 408 install command 375 instant markup project 391 first implementation 394 adding markup 395–396 goals for project 392 preparation 392–393 problem defined 391 second implementation 396 components 396 constructing rules and filters 402–403 filters 401 handler superclass 398–399 handlers 397 Parser class 401 putting it all together 403–408 Rule superclass 400 rules 399–400 tools 392 int function 548, 560 integers 10 large integers 12–13 IntegrityError exception class 287 InterfaceError exception class 287 interfaces and introspection 155–156 polymorphism 155–156 InternalError exception class 287 interpreter, interactive 8–9 Introduction to Algorithms Cormen, Thomas H. et al 387 IOError class 161 IronPython 571 alternative Python distribution 7 extending 358–360 is not operator 558 is operator 90, 91, 558 isfirstline function fileinput module 219, 220 isinstance function 560 isstdin function fileinput module 219 issubclass function 560 issubclass method built-in method 153 item access 179 basic sequence and mapping protocol 180–182 subclassing list, dict and str 182–184 items method dictionaries 75 iter function 560 iteration utilities numbered iteration 97 parallel iteration 96–97 iterators __iter__ method 173 iterator protocol 190 making sequences from iterators 191 iteritems method dictionaries 75, 96 iterkeys method dictionaries 76, 96 itertools module 252 itervalues method dictionaries 77, 96

588 ■INDEX ■J Java Swing GUI toolkit 271, 573 example of using with Jython 282–283 join method 61–62 as inverse of split method 63 JUnit test framework unittest module 347 Jython 571 alternative Python distribution 7 example of using with Java Swing GUI toolkit 282–283 extending 358–360 ■K KeyError class 161 keys method dictionaries 76 keyword arguments using with wx constructors 274 keyword parameters 119–121 Knuth, Donald Art of Computer Programming, The 387 ■L lambda expressions 133 lambda operator 558 ALTEX introduction 392 len function 40, 551, 560 library_dirs variable setting 291 line method Canvas class 413 lineno() function fileinput module 219 LinePlot class reportlab.graphics.charts.lineplots package 418 LineReceiver class Twisted framework 455 LineReceiver protocol twisted.protocols.basic module 310 lines generator instant markup project 394 linesep variable os module 217 Linux installing Python 3–4 installing Python with RPM 4–5 list comprehension 101–102 list function 41, 560 listen method dispatcher class 458 socket class 298 listenTCP function twisted.internet.reactor module 309 lists 31, 40, 548 assigning to slices 42 changing 41 changing lists 41 deleting elements 42 list function 41 methods 43, 562 advanced sorting 48–49 append method 43 count method 43 extend method 44 index method 44 insert method 45 pop method 45–46 remove method 46 reverse method 46–47 sort method 47–48 load function pygame.image module 530 locals function 560 localtime function time module 441

■INDEX<br />

587<br />

initialization 38<br />

naming functions 370<br />

inplace parameter<br />

fileinput module 220<br />

input compared <strong>to</strong> raw_input 26<br />

input function 548, 560<br />

fileinput module 219<br />

insert method<br />

lists 45<br />

inspect module 156, 408<br />

install command 375<br />

instant markup project 391<br />

first implementation 394<br />

adding markup 395–396<br />

goals for project 392<br />

preparation 392–393<br />

problem defined 391<br />

second implementation 396<br />

components 396<br />

constructing rules and filters 402–403<br />

filters 401<br />

handler superclass 398–399<br />

handlers 397<br />

Parser class 401<br />

putting it all <strong>to</strong>gether 403–408<br />

Rule superclass 400<br />

rules 399–400<br />

<strong>to</strong>ols 392<br />

int function 548, 560<br />

integers 10<br />

large integers 12–13<br />

IntegrityError exception class 287<br />

InterfaceError exception class 287<br />

interfaces<br />

and introspection 155–156<br />

polymorphism 155–156<br />

InternalError exception class 287<br />

interpreter, interactive 8–9<br />

Introduction <strong>to</strong> Algorithms<br />

Cormen, Thomas H. et al 387<br />

IOError class 161<br />

Iron<strong>Python</strong> 571<br />

alternative <strong>Python</strong> distribution 7<br />

extending 358–360<br />

is not opera<strong>to</strong>r 558<br />

is opera<strong>to</strong>r 90, 91, 558<br />

isfirstline function<br />

fileinput module 219, 220<br />

isinstance function 560<br />

isstdin function<br />

fileinput module 219<br />

issubclass function 560<br />

issubclass method<br />

built-in method 153<br />

item access 179<br />

basic sequence and mapping pro<strong>to</strong>col<br />

180–182<br />

subclassing list, dict and str 182–184<br />

items method<br />

dictionaries 75<br />

iter function 560<br />

iteration utilities<br />

numbered iteration 97<br />

parallel iteration 96–97<br />

itera<strong>to</strong>rs<br />

__iter__ method 173<br />

itera<strong>to</strong>r pro<strong>to</strong>col 190<br />

making sequences from itera<strong>to</strong>rs 191<br />

iteritems method<br />

dictionaries 75, 96<br />

iterkeys method<br />

dictionaries 76, 96<br />

iter<strong>to</strong>ols module 252<br />

itervalues method<br />

dictionaries 77, 96

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

Saved successfully!

Ooh no, something went wrong!