Serhiy Storchaka added the comment: First, thank you Miguel and klappnase for your patches. But they should be provided in different way, as described in Python Developer’s Guide [1].
> I totally disagree of this change on your patch: This is not my patch. This is regenerated klappnase's. I expected this will allow to use the Rietveld Code Review Tool for reviewing, but unfortunately Rietveld don't accept these patches [2]. Below I added comments to the patch. I agree, that all these complications are not needed. Just use getboolean(). It always returns bool in recent Python. And don't bother about _configure(). Just duplicate the code. It can be refactored later, in separate issue. Since this is a new feature, it can added only in developing version (future 3.7). Forgot about 2.7 and 3.5. If make the patch fast, there is a chance to get it in 3.6 (if release manager accept this). But tests are needed. > At least with python 3.4 here wantobjects still is valid, and personally I > really hope that it remains this way, because I use to set wantobjects=False > in my own code to avoid having to deal with errors because of some method or > other unexpectedly returning TclObjects instead of Python objects (which has > been happening here occasionally ever since they were invented). There was an attempt to deprecate wantobjects=False (issue3015), but it is useful for testing and I think third-party program still can use it. If you encounter an error because some standard method return Tcl_Object, please file a bug. This is considered as a bug, and several similar bugs was fixed in last years. Here are comments to the last klappnase's patch. Please add a serial number to your next patch for easier referring patches. + def tk_busy(self, **kw): Shouldn't it be just an alias to tk_busy_hold? + '''Queries the busy command configuration options for + this window. PEP 257: "Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description." + any of the values accepted by busy_hold().''' PEP 257: "Unless the entire docstring fits on a line, place the closing quotes on a line by themselves." + return(self.tk.call('tk', 'busy', 'cget', self._w, '-'+option)) Don't use parentheses around the return value. + the busy cursor can be specified for it by : Remove a space before colon, add an empty line after it. + def tk_busy_hold(self, **kw): Since the only supported option is cursor, just declare it. def tk_busy_hold(self, cursor=None): + -cursor cursorName "-cursor cursorName" is not Python syntax for passing arguments. + return((self.tk.getboolean(self.tk.call( + 'tk', 'busy', 'status', self._w)) and True) or False) Just return the result of self.tk.getboolean(). [1] https://docs.python.org/devguide/ [2] http://bugs.python.org/review/28498/ ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28498> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com