Skip to content

Update tutorials to include super().__init__() when subclassing mesa.model #2017

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

Closed
davidbailey opened this issue Jan 29, 2024 · 1 comment
Closed

Comments

@davidbailey
Copy link

Describe the bug
The tutorials (e.g. https://mesa.readthedocs.io/en/stable/tutorials/intro_tutorial.html) instruct users to subclass mesa.model. However they do not say to include super().init(). In https://github.com/projectmesa/mesa/blob/main/mesa/model.py#L62-L77 it states you should "Always start with super().init() to initialize the model object properly."

Expected behavior
The documentation should tell users how to properly use the mesa.model class. The examples should include super().init() when subclassing mesa.model

To Reproduce
Not applicable.

Additional context
None.

@rht
Copy link
Contributor

rht commented Feb 4, 2024

Closed via #2025.

@rht rht closed this as completed Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants