[issue6567] Make inf be almost equal to inf

2009-07-25 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: I would like to ask as a feature request that "inf" be almost equal to "inf". I wrote a program with a timeline class that had a method to tell the time of the last event registered into it such that some events would be positioned at th

[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Lucas Prado Melo
Changes by Lucas Prado Melo : -- type: -> behavior ___ Python tracker <http://bugs.python.org/issue6567> ___ ___ Python-bugs-list mailing list Unsubscri

[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Lucas Prado Melo
Changes by Lucas Prado Melo : -- components: +Tests ___ Python tracker <http://bugs.python.org/issue6567> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Lucas Prado Melo
Changes by Lucas Prado Melo : -- versions: +Python 3.2 ___ Python tracker <http://bugs.python.org/issue6567> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Lucas Prado Melo
New submission from Lucas Prado Melo : When we use TestCase.assertAlmostEqual to compare two float('inf') objects, the result is that float('inf') is not almost equal to float('inf'). I believe this is a bug. I tested against r74195 of Python 3.2 and against Pyth

[issue5870] subprocess.DEVNULL

2009-07-12 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: -1 on this one. It is not a portable decision (only *nix OSes do have /dev/null). Also, why would we want it as a default constant? The subprocess module would need to open /dev/null every time. Despite that, I can't see how would someone use the redire

[issue6467] raw_input() doesn't work as expected when it gets multiple ^D

2009-07-12 Thread Lucas Prado Melo
New submission from Lucas Prado Melo : -- $ cat raw_input_test.py s = '' try: while True: c = raw_input() print c s += c except EOFError: pass $ python raw_input_test.py test^D^Dtes ^D $ python --version Python 2.

[issue6447] PATCH: typo (English) in subprocess module

2009-07-09 Thread Lucas Prado Melo
New submission from Lucas Prado Melo : I am pretty sure this patch is alright. -- nosy: +lucaspmelo ___ Python tracker <http://bugs.python.org/issue6447> ___ ___

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-23 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: I think this patch is ok. -- ___ Python tracker <http://bugs.python.org/issue5230> ___ ___ Python-bugs-list mailing list Unsub

[issue6064] Add "daemon" argument to threading.Thread constructor

2009-06-17 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: +1 to the py3k diff. :) Hey, I think this daemon property should be set as a keyword argument of the Thread constructor. -- nosy: +conf ___ Python tracker <http://bugs.python.org/issue6

[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2009-06-15 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: Ok A new patch without read1() changes. Only one test fails, a read1() test: == FAIL: test_read1 (test.test_io.PyBufferedRWPairTest

[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2009-06-14 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: Here, it's a patch that passes all the tests (I had to change some of them though, they were expecting erroneous behaviours IMHO). The biggest problem was the read1 testing, I've tried to get the maximum of bytes less than or equal to what the u

[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2009-06-14 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: Here is a patch that passes all the tests (I had to change some of them though, they were expecting erroneous behaviours IMHO). The biggest problem was the read1 testing, I've tried to get the maximum of bytes less than or equal to what the user wanted

[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2009-06-13 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: We could fill the buffer while moving its start point to 0. I guess this behavior would require a new function (or a new parameter to Modules/_io/bufferedio.c:_bufferedreader_fill_buffer() ). If you are ok with that I could write a patch

[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2009-06-12 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: There's a problem with my patch... When the size of the data we want to peek is too big ( > buffer_len - start ) the cursor will move, thus there isn't a case where the peek function would work properly (except when we want to peek() just 1 byte)

[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2009-06-12 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: Oops I overlooked I minor flaw. A second version. -- Added file: http://bugs.python.org/file14282/peek2.diff ___ Python tracker <http://bugs.python.org/issue5

[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2009-06-12 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: Hey guys, I did a patch about this one. I didn't do many tests but I guess it is ok (it works like I think it should). What do you think? -- keywords: +patch nosy: +conf Added file: http://bugs.python.org/file14281/peek

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-03 Thread Lucas Prado Melo
Changes by Lucas Prado Melo : Removed file: http://bugs.python.org/file14140/pydocs.diff ___ Python tracker <http://bugs.python.org/issue5230> ___ ___ Python-bugs-list m

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-03 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: I had lots of stuff to do lately, sorry it took me so long to answer. Here is the patch as we intended, but there is a bug yet. What if the non-existent imported module has the same name of the module itself? $ cat pydoc_badimport3.py import

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-02 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: Take a look at the output: $ python pydoc.py test.pydoc_badimport2 problem in test.pydoc_badimport2 - : No module named i_dont_exist.neither_do_i This is different from what you expected. How do we change this output? (I was talking about this issue in the

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-01 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: Thanks :) It seems that the error message carried by the ImportError object comes from Python/import.c:1504. What should we do: a) Edit Python/import.c b) Change the ImportError object c) Anything else

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-01 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: I didn't understand what you mean: what should be shown when pydoc tries to generate documentation for a module with the bad import 'import test.i_dont_exist.neither_do_i'? I am not a native english speaker, so please excuse me if you d

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-01 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: by the way, I was not acquainted with this unit test thing... sorry -- ___ Python tracker <http://bugs.python.org/issue5

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-01 Thread Lucas Prado Melo
Changes by Lucas Prado Melo : Removed file: http://bugs.python.org/file14138/pydocs.diff ___ Python tracker <http://bugs.python.org/issue5230> ___ ___ Python-bugs-list m

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-01 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: Ok. New patch that passes the unit tests and with a new unit test covering inexistant nested modules. -- Added file: http://bugs.python.org/file14140/pydocs.diff ___ Python tracker <http://bugs.python.

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-05-31 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: A new patch with an unit test and with whitespaces. -- Added file: http://bugs.python.org/file14138/pydocs.diff ___ Python tracker <http://bugs.python.org/issue5

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-05-31 Thread Lucas Prado Melo
Changes by Lucas Prado Melo : Removed file: http://bugs.python.org/file14137/pydocs.diff ___ Python tracker <http://bugs.python.org/issue5230> ___ ___ Python-bugs-list m

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-05-31 Thread Lucas Prado Melo
Changes by Lucas Prado Melo : Removed file: http://bugs.python.org/file14136/pydocs.diff ___ Python tracker <http://bugs.python.org/issue5230> ___ ___ Python-bugs-list m

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-05-31 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: The same patch with whitespaces. Is it ok now? -- Added file: http://bugs.python.org/file14137/pydocs.diff ___ Python tracker <http://bugs.python.org/issue5

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-05-31 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: I've written a patch. Hope you like it :) -- keywords: +patch nosy: +conf Added file: http://bugs.python.org/file14136/pydocs.diff ___ Python tracker <http://bugs.python.org/i