-
Notifications
You must be signed in to change notification settings - Fork 13
Code Phonology
Wiley Morgan edited this page Apr 12, 2018
·
9 revisions
[ ] "brackets"
{ } "braces"
( ) "parens" or "parentheses"
== "equal"
= "gets"
+= "iadd"
Speak operators as they are defined in python
f(x) "f of x"
generateKpoints(x,y,z=5) "generateKpoints of x comma y comma z gets 5"
lst[5] = 3 "list item 5 gets 3"
lst[:5] = ... "list slice to 5 gets ..."
lst[5:] = ... "list slice from 5 gets ..."
lst[3:5] = ... "list slice 3 to 5 gets ..."
lst[5::] = ... "list slice 3 to 5 gets ..."
v["calc"] "v getitem quote calc end quote"
v = {} "v gets empty dict"
"indent" to increase indentation level "outdent" to decrease indentation level "full outdent" go to beginning of line
l = [x,y for x,y in a.items()] "list comprehension of ...."