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

Modernize code a bit #19

Open
einarf opened this issue Dec 15, 2022 · 3 comments
Open

Modernize code a bit #19

einarf opened this issue Dec 15, 2022 · 3 comments

Comments

@einarf
Copy link

einarf commented Dec 15, 2022

There are things like def update and arcade.start_render() in examples.

Probably a good idea to encourage on_update and clear(). This will break in 2.7.

@pvcraven
Copy link
Owner

Agreed. I think the text examples probably need to be updated too.

@pvcraven
Copy link
Owner

I wonder about aliasing arcade.get_window().clear() with arcade.clear(). This is one of the first commands a new programmer will need, and chaining the dot operators before we really explain how that stuff works could be confusing.

@pvcraven
Copy link
Owner

Another side-issue, this will cause a warning in PyCharm:

def on_update(self, delta_time) :

Because it is expecting this:

def on_update(self, delta_time: float = 1 / 60) -> None:

I don't normally cover default parameters or typing when starting on functions. Open question about the 'method signature' warning, if it will confuse people, or matching the sig will confuse people.

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