[issue6410] Dictionaries should support __add__

2009-07-04 Thread Tim Gordon
Tim Gordon added the comment: __add__ is non-commutative for lists, tuples, strings etc. - perhaps non-commutative wasn't quite what you were looking for :p. -- nosy: +QuantumTim status: pending -> open ___ Python tracker <http://bugs

[issue5374] optparse special usage tokens conflict with formatting characters

2009-02-26 Thread Tim Gordon
Tim Gordon added the comment: Try escaping the '%prog' in your usage string (i.e. use '%%prog' instead) so you don't get the error when you substitute values in. -- nosy: +QuantumTim ___ Python tracker <http

[issue5242] eval() function in List Comprehension doesn't work

2009-02-13 Thread Tim Gordon
Tim Gordon added the comment: If you know what variable you are going to be eval-ing, or at least, have a list of those that might be eval-ed, you can get around this issue by making sure they are explicitly referenced in the inner scope (i.e., in the list comprehension). For example, even

[issue4633] file.tell() gives wrong result

2008-12-11 Thread Tim Gordon
Tim Gordon <[EMAIL PROTECTED]> added the comment: Try using the readline method instead of next. I don't think that applies the same buffering. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue4633] file.tell() gives wrong result

2008-12-11 Thread Tim Gordon
Tim Gordon <[EMAIL PROTECTED]> added the comment: See the documentation for file.next (http://docs.python.org/library/stdtypes.html#file.next). As you can see, file.next uses a buffer which will mess with the result of other methods, such as file.tell. -- nosy: +Quan

[issue4115] split() method

2008-10-13 Thread Tim Gordon
Tim Gordon <[EMAIL PROTECTED]> added the comment: This is the intended behaviour. See http://www.python.org/doc/2.5.2/lib/string-methods.html for details. -- nosy: +QuantumTim ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4031] 08 value popups an stdin error, no date handle allowed

2008-10-03 Thread Tim Gordon
Tim Gordon <[EMAIL PROTECTED]> added the comment: Whoops, I thought the tracker automatically removed quoted text! :z ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4031] 08 value popups an stdin error, no date handle allowed

2008-10-03 Thread Tim Gordon
Tim Gordon <[EMAIL PROTECTED]> added the comment: By prefixing a number with 0, you're actually using octal rather than decimal (i.e., only digits 0 to 7 are valid). For example, try: >>> print 030 24 >>> print 077 63 patricio wrote: > New submission

[issue2294] Bug in Pickle protocol involving __setstate__

2008-03-15 Thread Tim Gordon
Tim Gordon <[EMAIL PROTECTED]> added the comment: You've missed off the two underscores after the name __setstate__ :p -- nosy: +QuantumTim __ Tracker <[EMAIL PROTECTED]> <http://bugs.

[issue1271] Raw string parsing fails with backslash as last character

2007-10-12 Thread Tim Gordon
Tim Gordon added the comment: So basically raw strings are useless if you need to end a string with a backslash, as there is no way to quote the backslash to make it not do this... This surely can't be too hard to "fix" if one considers it a problem (which I do), and just b

[issue1271] Raw string parsing fails with backslash as last character

2007-10-12 Thread Tim Gordon
New submission from Tim Gordon: If you have a raw string with a backslash as the last character, the parser thinks the following quote, actually used to mark the end of the string, is being quoted by the backslash. For example, r'\' should be the string with one backslash, but...

[issue1240] str.split bug when using sep = None and maxsplit

2007-10-05 Thread Tim Gordon
Changes by Tim Gordon: -- title: str.split bug -> str.split bug when using sep = None and maxsplit __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1240> __ ___

[issue1240] str.split bug

2007-10-05 Thread Tim Gordon
Changes by Tim Gordon: -- title: str.split possible bug -> str.split bug __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1240> __ ___ Python-bugs-li

[issue1240] str.split possible bug

2007-10-05 Thread Tim Gordon
New submission from Tim Gordon: >From the docs for str.split: "If sep is not specified or is None... First, whitespace characters are stripped from both ends. Then, words are separated by arbitrary length strings of whitespace characters." However, ' a b c '.split(None