-
Notifications
You must be signed in to change notification settings - Fork 253
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
mixedCase naming convention #179
Comments
Hm. I thought it was good not to confuse I like the snake case :) primarily because that makes it easy to spot what's part of Qt.py and what's not. But it's not something I would want to fight over. You decide :) |
Good point, good point. It's worth taking into account.
My motivation for wanting mixedCase everywhere is part cleanliness but
mainly discoverability. At this point, *some* members of QtCompat are
mixedCase, such as `setSectionResizeMode` whereas others are snake case.
Which means it isn't enough to remember what a member was called, but also
which case convention it has. It adds unessecary cognitive load.
Let's think about it.
|
Yes, I see the dilemma. I know what the pep says, but let's not get too tangled up in that. The pep is really just guidelines in this case. We're going past that here and need to define our own rules. Right now I think it would be very weird to rename We could very well conform to mixedCase, such as renaming But when talking about the functions within
|
Also, we could rename |
I'm not sure you need to change the naming, since it's essentially replacing that function and the namespace will be different. |
Ok, sounds like we're in agreement on this convention. from Qt import QtCompat
QtCompat.loadUi(...)
QtCompat.setSectionResizeMode(...) And we'll let the namespace be the differentiator to whether it is an original or wrapped function. Any additional thoughts, feel free to add. |
I'm guessing we can close this, right? |
Indeed! |
Currently,
load_ui
is snake_case but Qt and it's bindings are all mixedCase.I originally chose this convention so as to conform with PEP8 but in retrospect it doesn't seem appropriate as it intermixed two conventions in one library.
This issue then is about conforming new members of QtCompat to members of other submodules, e.g. QtCore and QtGui.
E.g.
loadUi
The text was updated successfully, but these errors were encountered: