Python default Jul 20 2011 02 32 18 GCC LLVM Emscripten Empythoned on

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
Python 2.7.2 (default, Jul 20 2011, 02:32:18)
[GCC 4.2.1 (LLVM, Emscripten 1.5, Empythoned)] on linux2
class Machine():
.. def __init__(self, model):
.. self.model = model
..
power = Machine('BMW')
power.model
=> 'BMW'
power = 500
power.model
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'int' object has no attribute 'model'
power
=> 500