OO mode: inheritance
darvin opened this issue · comments
in Object Oriented mode, make several animals.
class animal(object):
....
class Turtle(animal)
....
there is only two predifined classes. another classes user will define
pictures of animal are shipped with programm and equal class name or class's father name
after #60
some troubles with it:
in in-game console:
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
x=Frog()
class JumpingFrog(Frog):
pass
d = JumpingFrog()
send()
in stderr:
Traceback (most recent call last):
File "/usr/lib/python2.6/multiprocessing/queues.py", line 242, in _feed
send(obj)
PicklingError: Can't pickle <class 'JumpingFrog'>: attribute lookup builtin.JumpingFrog failed
any ideas?
For some reason JumpingFrog
's __module__
is set to __builtin__
. It needs to be set to __main__
. I tried setting it manually to __main__
and it worked. So investigate why it's being set to __builtin__
.