[Python] Can I write a class function in Codecombat?


#1

When I write the following code, it doesn’t work. But it seems OK

class Test(object):
    a = 1
    def plus(self): 
        return self.a + 1

a = Test()
self.say(a.plus())

#2

I don’t think you can write classes. The keyword self is already used for most of the methods.


#3

We need to do some more work on our transpiler before we can support classes, but we will get them implemented eventually!