12.07.2015 Views

Is Python a

Is Python a

Is Python a

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Hhandler, 578“has-a” relationship, 523hash tables, 161hashes, 160“hello world” program, 230help function, 74, 283–285hexadecimalliterals, 94, 105octal literals and, 95home directory, 391HTML (Hypertext Markup Language), 10I_ _iadd_ _ method, 492icons, clicking, 42–45limitations, 45raw_input, 44–45Windows, 42IDEs, 632Eclipse, 55IDLE (see IDLE user interface)Komodo, 55PyDev, 55<strong>Python</strong>Card, 55<strong>Python</strong>Win, 55WingIDE, 55IDLE Run Module menu option, 50IDLE text editor, 40IDLE user interface, 50–54, 632advanced tools, 54clear-screen option, 53connection errors, 53customizing, 53debugger, 54nested modules, 53repeating prior commands, 52running file of code that you areediting, 51running scripts, 53single-process mode, 53source code files, 51Start button menu for <strong>Python</strong>, 51starting IDLE on Windows, 51syntax-directed colorization, 51threaded programs, 53Tkinter GUI, 51, 53usability features, 54if statements, 236–247basic examples, 237general format, 236multiway branching, 237–239if/elif/else statement, 202if/else ternary expression, 244imaginary numbers, 104immutability (strings), 71implementation alternatives, 28–29C<strong>Python</strong>, 28Iron<strong>Python</strong>, 29Jython, 28import as extension, 431_ _import_ _ function, 394, 439import hooks, 393import statement, 45–50, 202, 387–389,389–395, 399.pth file directories, 391advanced module selection concepts, 393compiling, 394from statement and, 402happening only once, 400home directory, 391importing by name string, 438module file selection, 393modules, 385multiple imports, 46namespaces, 49PYTHONPATH directories, 391relative syntax, 431–434running, 394standard library directories, 391sys.path list, 392usage notes, 49using extensions or paths, 292when required, 404in membership test, 248, 260, 263, 276in operator, 96indentation, 291end of, 205rule, 206–208IndexError exception, 494, 578indexing, 123indexing expressions, 70indirect calls, 370Informix, 11inheritance, 452, 469–472, 483, 486–491,518abstract superclasses, 490attribute inheritance search, 453–455attribute tree construction, 487class interface techniques, 489classes inherit attributes from theirsuperclasses, 469customization via, 453diamond pattern change, 546–549Index | 689

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

Saved successfully!

Ooh no, something went wrong!