Pyli/Methods/Type

From Jonathan Gardner's Tech Wiki
< Pyli‎ | Methods
Jump to: navigation, search

Types

There are no methods to check the type of an object. It isn't necessary or tolerated.

  • (fn (args) body ...): Creates a new anonymous function.
  • (macro (args) body ...): Creates a new anonymous macro.
  • (int x): Casts to an int.
  • (float x): Casts to a float.
  • (vector ...):
  • (dict ...): Creates a new dict. If an arg is a dict, then the keys and values are copied. If an arg is something else, then it is the key and the next arg is the value.
  • (iter x): Creates a new iter.
  • (string x): Creates a new string, a copy of whatever x would be.
  • (repr x): Creates a string that represents, in code form, what the x is.