[issue10986] traceback's rendering behavior while throwing custom exception

2011-01-22 Thread Benjamin VENELLE
New submission from Benjamin VENELLE : Hi, >From few days, I've acknowledge when throwing an exception, the last traceback >entry is always related to the raise statement. This is ok when the exception >takes source from a non fail-safe code. But when an exception is rai

[issue10968] Timer class inheritance issue

2011-01-21 Thread Benjamin VENELLE
Benjamin VENELLE added the comment: Yes that's it. I Should precise it. I've taken a screenshot from my python's interpreter to spot it. -- Added file: http://bugs.python.org/file20479/issue10968.png ___ Python tracker <http

[issue10968] Timer class inheritance issue

2011-01-21 Thread Benjamin VENELLE
Benjamin VENELLE added the comment: I've tested it with Python 3.1.2 under Windows 7 32 bits. It raises the following TypeError exception "function() argument 1 must be code, not str" -- ___ Python tracker <http://bugs.pyt

[issue10968] Timer class inheritance issue

2011-01-20 Thread Benjamin VENELLE
New submission from Benjamin VENELLE : Hi, Due to Timer's object creation behavior, it is impossible to subclass it. This kind of declaration will result to an exception raising: class A(Timer): pass -- components: +Library (Lib) -Benchmarks versions: +Pytho

[issue10968] Timer class inheritance issue

2011-01-20 Thread Benjamin VENELLE
Changes by Benjamin VENELLE : -- assignee: collinwinter components: Benchmarks nosy: Kain94, collinwinter priority: normal severity: normal status: open title: Timer class inheritance issue type: behavior ___ Python tracker <http://bugs.python.

[issue8634] get method for dbm interface

2010-08-01 Thread Benjamin VENELLE
Benjamin VENELLE added the comment: Yes I know, that's why get() should be a standard dbm's method like __getitem__() and __setitem__(). So, defining it in all classes which implements dbm interface would be a good enhancement. --

[issue8634] [PATCH] get method for dbm interface

2010-05-06 Thread Benjamin VENELLE
New submission from Benjamin VENELLE : I'm suggesting to add the dict's 'get' method to dbm interface. So that, it would be easier to manage 'key not found' issues. B. Venelle. -- components: Library (Lib) messages: 105130 nosy: Kain94 priority: normal

[issue8486] [PATCH] threading.Event()

2010-04-21 Thread Benjamin VENELLE
Benjamin VENELLE added the comment: > In this case, you don't have to use an Event. A boolean attribute on one > of your objects is enough. > (similarly, you would use a "volatile" variable in C) This is already the case with Event. Look at threading.py @line ~355

[issue8486] [PATCH] threading.Event()

2010-04-21 Thread Benjamin VENELLE
Benjamin VENELLE added the comment: Yes, I agree when Event objects are used to sync threads. But in my case, I'm using them like signals to terminate some server's thread through a proper way. This is a just a "cosmetic" stuff to

[issue8486] [PATCH] threading.Event()

2010-04-21 Thread Benjamin VENELLE
New submission from Benjamin VENELLE : Hi, I'm suggesting to declare a __bool__() function as an alias for is_set() in Event class from threading package. So Event objects could be used like booleans. Ex: I thought 'while(not event): do_something()' is much intuitive

[issue8148] logging.SyslogHandler.emit()

2010-03-15 Thread Benjamin VENELLE
New submission from Benjamin VENELLE : Hi, In SyslogHandler class from logging package, emit() function calls socket.sendto() at line 785. Passing arguments are not in the right order due to flags parameter which is optional (@see http://docs.python.org/py3k/library/socket.html

[issue8103] threading.start() : unable to restart thread

2010-03-09 Thread Benjamin VENELLE
New submission from Benjamin VENELLE : Hi, I've found a bug in threading module. "self._started" event is never cleared when thread terminates. So, at line 452, in start() function, the test "if self._started.is_set():" prevents any restart. PS: I saw this bug in

[issue8094] Multiprocessing infinite loop

2010-03-09 Thread Benjamin VENELLE
Benjamin VENELLE added the comment: Sorry I've not made clear my working platform. Yes, I'm running Python 3.1.1 32 bit on a Windows 7 x64. -- ___ Python tracker <http://bugs.python.

[issue8094] Multiprocessing infinite loop

2010-03-09 Thread Benjamin VENELLE
New submission from Benjamin VENELLE : Hi, The following code results in an infinite loop --> # import multiprocessing def f(m): print(m) p = multiprocessing.Process(target=f, args=('pouet',)) p.start() # I've firstly think about an issue in my code when