Skip to content
brett hartshorn edited this page Jun 12, 2015 · 17 revisions

classes

  • multiple inheritance
  • operator overloading (explicit)
  • function and class decorators
  • getter/setter function decorators
  • list comprehensions
  • regular and lambda functions
  • function calls with *args and **kwargs

Language Keywords

  • global, nonlocal
  • while, for, continue, break
  • if, elif, else,
  • switch, case
  • try, except, raise
  • def, lambda
  • new, class
  • from, import, as
  • pass, assert
  • and, or, is, in, not
  • return, yield

HTML DOM Iterables

for item in iterable

  • NodeList
  • FileList
  • ClientRectList
  • DOMSettableTokenList
  • DOMStringList
  • DataTransferItemList
  • HTMLCollection
  • HTMLAllCollection
  • SVGElementInstanceList
  • SVGNumberList
  • SVGTransformList

Operator Overloading

TODO

  • add
  • mul

builtins

  • dir
  • type
  • hasattr
  • getattr
  • setattr
  • issubclass
  • isinstance
  • dict
  • list
  • tuple
  • int
  • float
  • str
  • round
  • range
  • sum
  • len
  • map
  • filter
  • min
  • max
  • abs
  • ord
  • chr
  • open (nodejs only)

List

  • list.append
  • list.extend
  • list.remove
  • list.insert
  • list.index
  • list.count
  • list.pop
  • list.len
  • list.contains
  • list.getitem
  • list.setitem
  • list.iter
  • list.getslice

Set

  • set.bisect
  • set.difference
  • set.intersection
  • set.issubset

String

  • str.split
  • str.splitlines
  • str.strip
  • str.startswith
  • str.endswith
  • str.join
  • str.upper
  • str.lower
  • str.index
  • str.find
  • str.isdigit
  • str.format
  • str.getitem
  • str.len
  • str.getslice

Dict

  • dict.copy
  • dict.clear
  • dict.has_key
  • dict.update
  • dict.items
  • dict.keys
  • dict.get
  • dict.set
  • dict.pop
  • dict.values
  • dict.contains
  • dict.iter
  • dict.len
  • dict.getitem
  • dict.setitem

Sidebar

Clone this wiki locally