[web2py] typo book chapter 2

2011-11-09 Thread Herman
>>> a = 1 # reset a >>> def g(b): a = 2 # creates a new local a return b + 2 # change this to:return b + a

[web2py] typo book chapter 2

2011-10-17 Thread Herman
Here is a more complex class: >>> class MyClass(object): >>>z = 2 >>>def __init__(self, a, b): >>>self.x = a, self.y = b # change a, to a;

[web2py] typo book chapter 2

2011-08-03 Thread Herman
missing ":" Special Attributes, Methods and Operators >>> class MyList(object) >>> def __init__(self, *a): self.a = list(a) >>> class MyList(object): >>> def __init__(self, *a): self.a = list(a)

[web2py] typo book chapter 2

2011-08-02 Thread Herman
try...except...else...finally >>> try: >>> a = 1 / 0 >>> except Exception, e >>> print 'oops: %s' % e missing ":" >>> except Exception, e: