This legacy web site is no longer updated but will remain online for the foreseeable future. UUhistle is not being actively supported or developed. Successor systems include Jsvee and Kelmu.

Supported Python Language Features

This page documents which features of the Python language UUhistle supports as of February 28th, 2012 (UUhistle v0.6.1).

If you use any of the entirely unsupported features (marked in red below) in a program, UUhistle shows an error message and won't run your program. When something has limited support (marked in yellow), you need to be careful not to only use the language feature in the limited fashion — UUhistle won't warn you and may behave unexpectedly otherwise!

Name Status Example Limitations
Assertion Not supported assert a == 3
Assignment Limited support a = 3
a += 4
The left-hand side must contain only one destination and cannot contain any calls. Chained assignments not supported.
Built-in types Limited support set.add(x) See Other Limitations below
Calls Limited support foo(2, 3)
a.bar(3, 4)
Named parameters are not supported.
Class definition Limited support class A: Code within classes but outside of method definitions is not supported. There are known issues with class redefinitions.
Comparison Limited support 2 < 3 Chained comparisons like 2 < 3 < 4 are not supported.
Conditional expression Not supported 2 if a < b else 3
Control flow statements Supported break
continue
Delete Not supported del a
Dictionary Supported {'a' : 3}
Ellipsis Not supported a[1, ..., 1]
For Supported for i in range(4):
Function/method definition Limited support def foo(a, b):
def bar(self, a, b):
Varargs (*) and kwargs (**) are not supported. Functions can be defined only at the module level. Class and static methods are not supported. There are known issues with function/method redefinitions.
Generator expression Not supported foo(x for x in range(4))
Global variables Not supported global a
If Supported if a < b:
Import Limited support import math
from math import cos
from x import y as z
Only functions from built-in modules can be imported. See also Other Limitations below.
Indexing Supported a[3]
I/O Limited support print a, b
foo = raw_input('> ')
Trailing commas not allowed in print. I/O does not work properly within 'hidden code' built into an exercise in a course config file. See Other Limitations below for more on I/O.
Inheritance Not supported class Sub(Super):
Lambda expression Not supported lambda a: a ** 2
List Supported [1, 2, 3]
List comprehensions Not supported [x for x in range(3)]
Pass Supported pass
Raise Limited support raise IOError Does not currently work without an exception as argument.
Return Supported return 5
Slicing Supported a[2 : 5]
Threads Not supported Thread(...)
Try-except Limited support try:
 ...
except:
 ...
Only the message field of caught builtin exceptions is accessible.
Tuple Supported (2, 3)
While Supported while a < 4:
With Not supported with
Yield Not supported yield 3

Other Limitations

UUhistle supports only following built-in types: bool, dict, float, int, list, long, str, tuple and set. Objects of other built-in types are shown as empty class instances in the heap; their internal structure is not shown at all. You can not use methods of built-in classes other than those listed above. For instance, you cannot call the close method for a file object.

For UUhistle to work as it should — allowing the user to undo and redo execution steps at will — don't use any file or network operations or other streams. If UUhistle fails to serialize the program's state at each step into its undo buffer, undoing steps has undocumented and probably undesirable behavior.