Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OO mode: inheritance #61

Open
darvin opened this issue Sep 29, 2010 · 3 comments
Open

OO mode: inheritance #61

darvin opened this issue Sep 29, 2010 · 3 comments

Comments

@darvin
Copy link

darvin commented Sep 29, 2010

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

@darvin
Copy link
Author

darvin commented Sep 29, 2010

after #60

@darvin
Copy link
Author

darvin commented Sep 29, 2010

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?

@cool-RR
Copy link
Member

cool-RR commented Sep 29, 2010

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__.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants