Replies: 2 comments 1 reply
-
Chatting about it here, the feeling seems to be that this would be a good idea (it's one I'm a big fan of coming from other environments where it's generally less frowned upon). I'll raise a ticket for this and add it to the backlog. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hey @liancheng , you'll be happy to know that some widget verb methods return |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My app has a form-like interface, and binds one key to each widget to set focus and optionally adjust the input, e.g., toggling a switch, moving the cursor to the next
ListItem
in aListView
, etc.For
Switch
es, I wrote the following method to achieve this:The fact that both
focus()
andtoggle()
returnNone
prevented me from chaining the calls. If they returnedself
instead, the above method can be simplified to:I'm not quite sure whether this violates certain well-established Python best practices or conventions, though.
Beta Was this translation helpful? Give feedback.
All reactions