[issue4345] Implement nb_nonzero for PyTclObject

2012-03-13 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I'm closing the issue. People who want to check for an empty string representation can just convert the tcl objects to strings themselves. I agree with Mark that implementing nonzero is too ambiguous. -- nosy: +loewis resolution:

[issue4345] Implement nb_nonzero for PyTclObject

2010-08-04 Thread Mark Lawrence
Mark Lawrence breamore...@yahoo.co.uk added the comment: The patch changes _tkinter.c so can a C guru take a look please. -- nosy: +BreamoreBoy stage: - patch review versions: +Python 3.1, Python 3.2 -Python 2.6, Python 3.0 ___ Python tracker

[issue4345] Implement nb_nonzero for PyTclObject

2010-08-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I'd call this a new feature; removing 2.7 and 3.1 from versions. The patch needs updating for py3k, which should be a fairly simple task. I don't know much about Tcl, but wouldn't this change give quite confusing results for numeric

[issue4345] Implement nb_nonzero for PyTclObject

2010-08-04 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Mark, If you want to expand it to handle other data types, I'm ok with it but I predict troubles for you. The problem is that in Tcl there is only one real data type -- string. Depending on how you operate over a value it is then, internally,

[issue4345] Implement nb_nonzero for PyTclObject

2010-08-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: If you want to expand it to handle other data types, I'm ok with it but I predict troubles for you. Yes, I suspected as much. I don't know much Tcl, but I'm definitely prepared to believe you on this point. :) I'd be fine with this patch

[issue4345] Implement nb_nonzero for PyTclObject

2010-08-04 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: I assume that Tcl_GetCharLength works for any object, regardless of its internal representation? I didn't look at its code but I assume it will create a string representation for the object in question if there isn't one in place when the

[issue4345] Implement nb_nonzero for PyTclObject

2008-11-18 Thread Guilherme Polo
New submission from Guilherme Polo [EMAIL PROTECTED]: Implementing it makes this crazy check in http://bugs.python.org/issue3767 (http://bugs.python.org/file12043/tkColorChooser.diff) be no longer needed -- components: Tkinter files: _tkinter__nonzero__.diff keywords: patch messages: