[issue9760] Suggestion for improving with documentation

2010-09-03 Thread Jason Baker
New submission from Jason Baker : http://docs.python.org/reference/compound_stmts.html#with This documentation refers to "context expressions" in two places. However, it never really defines what a context expression is. The formal syntax that's presented is this: with_

[issue9849] Argparse needs better error handling for nargs

2010-09-13 Thread Jason Baker
New submission from Jason Baker : This is referring to argparse 1.1 installed under Python 2.6. When I was passing in an nargs flag, I figured that since '+' and '*' are valid options, I should pass in strings. So when I tried passing in the string '1' instea

[issue10034] Readline doc issue

2010-10-05 Thread Jason Baker
New submission from Jason Baker : There's an error in the documentation for readline here: http://docs.python.org/library/readline.html#example The first example doesn't import readline. -- assignee: d...@python components: Documentation messages: 118040 nosy: Jaso

[issue10046] Correction to atexit documentation

2010-10-07 Thread Jason Baker
New submission from Jason Baker : There's an issue with the documentation on the atexit module[1]. It states: "Note: the functions registered via this module are not called when the program is killed by a signal, when a Python fatal internal error is detected, or when os._exit()

[issue10046] Correction to atexit documentation

2010-10-08 Thread Jason Baker
Jason Baker added the comment: I like that phrasing. I think it would be a good idea to mention that this includes SIGINT by default, just to be explicit. -- ___ Python tracker <http://bugs.python.org/issue10

[issue11011] More functools functions

2011-01-25 Thread Jason Baker
New submission from Jason Baker : I've created a patch that adds some common functional programming tools to functools. I've made the patch to work against Python 3.2, but that may be a bit aggressive. If so, then I can adapt it to work with 3.3. I also wouldn't be opposed

[issue11011] More functools functions

2011-01-25 Thread Jason Baker
Jason Baker added the comment: Ray, thanks for prompt and thorough feedback. To address your concerns: * I'm fine with doing away with const and identity (long story short I haven't really used them in functional languages anyway). There were reasons for defining identity the

[issue11011] More functools functions

2011-01-25 Thread Jason Baker
Jason Baker added the comment: I'm not sure I understand how Raymond's alternative for trampoline works. Let's take the factorial algorithm from wikipedia's page on tail recursion[1]. I've implemented the tail recursive version of the algorithm in Python usi

[issue8581] Logging handlers do not handle double-closing very well

2010-04-30 Thread Jason Baker
New submission from Jason Baker : The logging handler does not handle double-closing very well: >>> from logging import StreamHandler >>> h = StreamHandler() >>> h.close() >>> h.close() Traceback (most recent call last): File "", line 1, in

[issue8581] Logging handlers do not handle double-closing very well

2010-04-30 Thread Jason Baker
Jason Baker added the comment: Adding patch -- keywords: +patch Added file: http://bugs.python.org/file17151/logging.patch ___ Python tracker <http://bugs.python.org/issue8

[issue8581] Logging handlers do not handle double-closing very well

2010-05-01 Thread Jason Baker
Jason Baker added the comment: Vinay, I don't necessarily disagree with you. However, this appears to be a pretty trivial change. If there is a 2.6.6, I think this should go in it. -- ___ Python tracker <http://bugs.python.org/i

[issue8690] multiprocessing.dummy.Queue does not expose same interface as multiprocessing.Queue

2010-05-11 Thread Jason Baker
New submission from Jason Baker : The multiprocessing.dummy.Queue class is merely an import of Queue.Queue. There are a few methods that this does not provide however: close, join_thread, and cancel_join_thread. I don't know what the best way to handle this is, but it should be p

[issue15551] Unit tests that return generators silently fail

2012-08-03 Thread Jason Baker
New submission from Jason Baker: The following test will pass silently: class SomeTest(unittest.TestCase): def testSomething(self): yield 1 self.fail() -- components: None messages: 167340 nosy: Jason.Baker priority: normal severity: normal status: open

[issue15551] Unit tests that return generators silently fail

2012-08-03 Thread Jason Baker
Jason Baker added the comment: I can play this game too! Since generator functions do nothing when used as a unittest test method, there is no value in having a test method that is a generator function. Therefore, it is an error to give a test method that is a generator function. Since it

[issue15551] Unit tests that return generators silently fail

2012-08-03 Thread Jason Baker
Jason Baker added the comment: Who expects this behavior? Can you give me an example of when someone would rely upon a generator test to do nothing? -- ___ Python tracker <http://bugs.python.org/issue15

[issue15551] Unit tests that return generators silently fail

2012-08-03 Thread Jason Baker
Jason Baker added the comment: I would like to verify this. Link the specification, and highlight where it says that the expected behavior for a test method that is a generator function is to do nothing. -- ___ Python tracker <h