第十二章 命令替换 第十二章 命令替换 命令替换重新指定一个[^1]或多个命令的输出。其实就是将命令的输出导到另外一个地方^2 。 命令替换的通常形式是(`...` ),即用反引号引用命令。 script_name = `basename $0` echo "The name of this script is $scirpt_name....
Modules Byte-compiled .pyc files {#pyc} The from..import statement {#from-import-statement} A module’s __name__ {#module-name} Making Your Own Modules The dir function {#dir-...
Removing Duplication and Winning Big Removing Duplication and Winning Big So far all the database code supporting insert, select, update, and delete, not to mention a command-l...
Models and Fields Fields Field types table Field initialization arguments Some fields take special parameters… Default field values ForeignKeyField DateTimeField, DateField an...
Loose Equals vs. Strict Equals Equality Performance Abstract Equality Comparing: string s to number s Comparing: anything to boolean Comparing: null s to undefined s Comparing...
Migrations Installation Overview Creating Migrations Syntax Migrations file name Columns definition Creating a table Adding columns to an existing table Adding a column as i...
安全性考虑¶ Pitfalls¶ Private Information and Randomness¶ Re-Entrancy¶ Gas Limit and Loops¶ Sending and Receiving Ether¶ Callstack Depth¶ tx.origin¶ Minor Details¶ Recommendatio...