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

Update Multiple inheritance in basics.rst #362

Merged
merged 1 commit into from
May 16, 2024
Merged

Conversation

bcarmo-caio
Copy link
Contributor

$ python --version
Python 3.9.18

$ pip freeze | grep colander
colander==2.0

$ python --version
Python 3.9.18

$ pip freeze | grep colander
colander==2.0
@bcarmo-caio
Copy link
Contributor Author

Or perhaps

class Three(Two, One):

was meant. And then the output matches.

@tseaver
Copy link
Member

tseaver commented May 16, 2024

After I get the CI unstuck, I'll look more closely at the output here.

Copy link
Member

@tseaver tseaver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much for the patch! I've fixed the CI issue already, so this one should be ready to merge once the note I suggested is added.

(<colander.SchemaNode object at 14868816 (named c)>,
<colander.String object at 0xe2e110>),
(<colander.SchemaNode object at 14868688 (named b)>,
<colander.Boolean object at 0xe2e090>),
(<colander.SchemaNode object at 14868944 (named d)>,
<colander.Boolean object at 0xe2e190>)]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to add an explanatory comment that the order of the children in the output is governed by Python's __mro__, e.g.

Suggested change
.. note::
The order of the children in the output above might seem suprising:
it is governed by how Python's multiple-inheritance works (the
``__mro__`` order).

@tseaver tseaver merged commit 301121d into Pylons:main May 16, 2024
26 of 27 checks passed
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

Successfully merging this pull request may close these issues.

2 participants