-
Notifications
You must be signed in to change notification settings - Fork 826
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
Refactor _option_list.py to consistently use accessors #2986
Comments
Not sure if it's relevant here or not, but it's worth keeping in mind that all other things being equal, we tend to go with the most direct route to a value to keep the code as efficient as possible. |
That's a fair point @davep. |
Yes, that's part of the public interface. To be clear though: I'm not setting a hard rule here, just dropping in a driveby reminder that normally our PRs will get a review along the line of "fewer calls please". Personally I'm a fan of building abstraction on abstraction but I see the value in keeping it as streamlined as possible internally (mostly if it's something that's likely to be called often). |
I don't think this is needed. It's fine for methods to use internal symbols. |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
As noticed in #2985, the _options_list.py file can be organised better to consistently use accessor functions such as
get_option_by_index()
instead of directly accessing_options
.I'm happy to implement this if it's the direction we want to go in? @rodrigogiraoserrao
The text was updated successfully, but these errors were encountered: