Main»Wiki Sandbox

Wiki Sandbox

Feel free to use this page to experiment with the Text Formatting Rules. Just click the "Edit Page" link at the bottom of the page.


Testing Python syntax highlighting:

from StringIO import StringIO

class Foo (object):
    """Class docstring.

    Foo does nothing of much use.

    "
""

    def f(x):
        """Return x+1"""
        return x + 1

    def gratuitous_map(f, x_values):
        """Map f to all values for x in x_values"""
        results = []
        for x in x_values:
            results.append(f(x))

if __name__ == "__main__":
    x = Foo()
    print x.f(1)
    print x.gratuitous_map(x.f, [1, 2, 3])

y = list((1,))
z = dict(foo="bar", blee="baz")
# A comment.
print "foo\n".find("o")
012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789

Change 1