Wednesday, May 27, 2009

Python

Files containing the last two days expressions and program statements A .py file may be compiled into Python bytecode Python prompt is case-sensitive I've been doing a Python somewhere in your system's PATH System/ programming language Library/Frameworks/Python.framework/workshop. Versions/Current/bin/python cross-platform The Interpreter results in the interpreter representing the value of the expression I'm Executing built-in help() function sure that some worthwhile with the argument "keywords" import raise assert except in return break exec is try class finally lambda while continue for not yield def from or del global pass elif if print end of file character to end your session Invoke creative the script relative path if myscript.py is work is being in a subdirectory of the current directory #! /usr/bin/python "she-bang" line tells a non-Windows OS to interpret the file chmod +x done with this language prompt after issuing ftype and assoc and before invoking explicit and unambiguous then 'endswith', this tool 'expandtabs', 'find', 'index', 'isalnum', 'isalpha','isdigit', 'islower', 'isspace', 'istitle', 'isupper', executes the compiled bytecode subsequent reload of the compiled module skips the interpretation step rapid application development this skill objects may also have attributes are containers of attributes have a type and an id Methods and Attributes e.g., a function calling a method always returns another object! That is, calling a method evaluates to an object, just like an but it is hard for me expression a method is just an attribute which is more about behavior than data object_value_or_reference.attribute_name str(object) -> string\n\nReturn an argument list is enclosed in parentheses an not to wonder argument list may have (and often has) zero arguments object_value_or_reference. method_name accessing attributes associates where it is all going built-in type() "function" returns a type object corresponding to is actually the built-in type() "function" itself! dir("OK") ['__add__', '__class__', '__contains__', '__delattr__', '__doc__', '__eq__', '__ge__', '__getattribute__', it all '__getitem__', '__getnewargs__', '__getslice__', '__gt__', '__hash__', '__init__', '__le__', '__len__', '__lt__', feels '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__str__', 'capitalize', 'center', 'count', 'decode', 'encode', 'join', 'ljust', 'lower', so disconnected from 'lstrip', 'replace', 'rfind', 'rindex', 'rjust', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill' what is beautiful float - 64 bit IEEE-754 floating point numbers modulo operator ("%") evaluates imaginary component NameError Exception every element in a sequence has an index and meaningful.

1 comment:

dftuttle said...

Geeze. You shake your head at my papers and exams, but if I had to do that shit I wouldn't last a day! I'll take a nice all-nighter thank you.