-
Notifications
You must be signed in to change notification settings - Fork 585
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
Issue with class constructors in python. #8490
Comments
I'm still encountering this almost a year later. Is this issue still not addressed? Without this fix there is no way to use or teach class construction in Minecraft EE. |
Is there a beta for Minecraft EE? That's where I'm encountering the issue. |
I found the beta (click the gear, click Experimental), though it's not integrated into the game very well. Even so, I get the same error 'Type annotation cannot appear on a constructor declaration' |
Experiencing the same also when trying classes in Python on arcade.makecode.com; Issues: Works a little better on the beta where everything including issue 1 compiles, in the main production webeditor, only 2 and 3. Import to make class accessible from another file in Python, ref. point 2 above, does not work in beta either. Hope you can have a look at this soon, and nice to see that the Python part is getting closer to the functionality of the JavaScript! |
@enauman: Seems like there has been some recent activity regarding classes in Python lately; #8879 Unsure about how it affects this specific issue, though. |
I am having an issue when declaring a class in python. I am getting an error 'Type annotation cannot appear on a constructor declaration' I have not used any type annotation. Another user has identified this as an error with converting the python to typescript
class cord:
def init (self, xCord, yCord):
self.x = xCord
self.y = yCord
Type annotation cannot appear on a constructor declaration.
The text was updated successfully, but these errors were encountered: