Re: Showing the method's class in expection's traceback

2008-05-30 Thread Agustin Villena
To this therad, I received 2 kinds of anwsers: - some that help me in - and other where some guy thinks that has the right to rule if my need has some value Thanksfully, Python is an open platform, and with the help obtained here, now I can fullfill my needs. Who is the arrogant? On 22 mayo,

Re: Showing the method's class in expection's traceback

2008-05-25 Thread Duncan Booth
Gabriel Genellina [EMAIL PROTECTED] wrote: En Thu, 22 May 2008 07:55:44 -0300, Duncan Booth [EMAIL PROTECTED] escribió: Bruno Desthuilliers [EMAIL PROTECTED] wrote: Not to say that your concerns are pointless, and that things cannot be improved somehow, but this is not that trivial, and

Re: Showing the method's class in expection's traceback

2008-05-25 Thread Gabriel Genellina
En Sun, 25 May 2008 06:15:45 -0300, Duncan Booth [EMAIL PROTECTED] escribió: Gabriel Genellina [EMAIL PROTECTED] wrote: En Thu, 22 May 2008 07:55:44 -0300, Duncan Booth [EMAIL PROTECTED] escribió: It might be worth considering an alternative approach here: a formatted exception includes the

Re: Showing the method's class in expection's traceback

2008-05-24 Thread Gabriel Genellina
En Thu, 22 May 2008 07:55:44 -0300, Duncan Booth [EMAIL PROTECTED] escribió: Bruno Desthuilliers [EMAIL PROTECTED] wrote: Not to say that your concerns are pointless, and that things cannot be improved somehow, but this is not that trivial, and there may be ambuiguities in some not so rare

Re: Showing the method's class in expection's traceback

2008-05-22 Thread Bruno Desthuilliers
Agustin Villena a écrit : And not that useful - why would one care about the function being defined in class X or Y when one have the exact file and line ? I have 3 reasons: 1) My developing time is expended running unit tests and browsing tracebacks to find which is the real problem. Knowing

Re: Showing the method's class in expection's traceback

2008-05-22 Thread Duncan Booth
Bruno Desthuilliers [EMAIL PROTECTED] wrote: Not to say that your concerns are pointless, and that things cannot be improved somehow, but this is not that trivial, and there may be ambuiguities in some not so rare cases. It might be worth considering an alternative approach here: a

Re: Showing the method's class in expection's traceback

2008-05-22 Thread Agustin Villena
On May 22, 5:19 am, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: Agustin Villena a écrit : And not that useful - why would one care about the function being defined in class X or Y when one have the exact file and line ? I have 3 reasons: 1) My developing time is expended

Re: Showing the method's class in expection's traceback

2008-05-22 Thread Tim Golden
Agustin Villena wrote: I don't see things like you, because I'm accustomed to design my software though classes and see the code in an object = software's functional atom/component way I agree that python's dynamic nature make things complicated here, but for me it its just an implementation

Re: Showing the method's class in expection's traceback

2008-05-22 Thread Bruno Desthuilliers
Agustin Villena a écrit : On May 22, 5:19 am, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: Agustin Villena a écrit : And not that useful - why would one care about the function being defined in class X or Y when one have the exact file and line ? I have 3 reasons: 1) My developing

Re: Showing the method's class in expection's traceback

2008-05-21 Thread Bruno Desthuilliers
Gabriel Genellina a écrit : En Sun, 18 May 2008 17:31:44 -0300, Diez B. Roggisch [EMAIL PROTECTED] escribió: Agustin Villena schrieb: is there anyway to show the class of a method in an exception's traceback? I want to improve the line File G:\dev\exceptions\sample.py, line 3, in foo to

Re: Showing the method's class in expection's traceback

2008-05-21 Thread Richard G Riley
Bruno Desthuilliers [EMAIL PROTECTED] writes: Gabriel Genellina a écrit : En Sun, 18 May 2008 17:31:44 -0300, Diez B. Roggisch [EMAIL PROTECTED] escribió: Agustin Villena schrieb: is there anyway to show the class of a method in an exception's traceback? I want to improve the line File

Re: Showing the method's class in expection's traceback

2008-05-21 Thread Bruno Desthuilliers
Richard G Riley a écrit : Bruno Desthuilliers [EMAIL PROTECTED] writes: (snip) And not that useful - why would one care about the function being defined in class X or Y when one have the exact file and line ? Very obvious I would think. One can develop ones own interactive class browser

Re: Showing the method's class in expection's traceback

2008-05-21 Thread Richard G Riley
Bruno Desthuilliers [EMAIL PROTECTED] writes: Richard G Riley a écrit : Bruno Desthuilliers [EMAIL PROTECTED] writes: (snip) And not that useful - why would one care about the function being defined in class X or Y when one have the exact file and line ? Very obvious I would think. One

Re: Showing the method's class in expection's traceback

2008-05-21 Thread Bruno Desthuilliers
Richard G Riley a écrit : Bruno Desthuilliers [EMAIL PROTECTED] writes: Richard G Riley a écrit : Bruno Desthuilliers [EMAIL PROTECTED] writes: (snip) And not that useful - why would one care about the function being defined in class X or Y when one have the exact file and line ? Very

Re: Showing the method's class in expection's traceback

2008-05-21 Thread Agustin Villena
And not that useful - why would one care about the function being defined in class X or Y when one have the exact file and line ? I have 3 reasons: 1) My developing time is expended running unit tests and browsing tracebacks to find which is the real problem. Knowing the offender class

Re: Showing the method's class in expection's traceback

2008-05-21 Thread Agustin Villena
On 20 mayo, 12:10, Gabriel Genellina [EMAIL PROTECTED] wrote: En Mon, 19 May 2008 10:54:05 -0300, Agustin Villena [EMAIL PROTECTED] escribió: On May 18, 4:31 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: Agustin Villena schrieb: is there anyway to show the class of amethodin

Re: Showing the method's class in expection's traceback

2008-05-20 Thread Gabriel Genellina
En Mon, 19 May 2008 10:54:05 -0300, Agustin Villena [EMAIL PROTECTED] escribió: On May 18, 4:31 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: Agustin Villena schrieb: is there anyway to show the class of amethodin an exception's traceback? I want to improve the line File

Re: Showing the method's class in expection's traceback

2008-05-19 Thread Gabriel Genellina
En Sun, 18 May 2008 17:31:44 -0300, Diez B. Roggisch [EMAIL PROTECTED] escribió: Agustin Villena schrieb: is there anyway to show the class of a method in an exception's traceback? I want to improve the line File G:\dev\exceptions\sample.py, line 3, in foo to File

Re: Showing the method's class in expection's traceback

2008-05-19 Thread Diez B. Roggisch
That by itself is not enough, the method could be inherited; one should walk the base classes in the MRO to find the right one. And deal with classmethods and staticmethods. And decorators that don't preserve meta information... Hmmm, I think it isn't so trivial as it seems. You might even

Re: Showing the method's class in expection's traceback

2008-05-19 Thread Agustin Villena
On May 18, 4:31 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: Agustin Villena schrieb: Hi! is there anyway to show the class of amethodin an exception's traceback? For example, the next code class Some(object): def foo(self,x): raise Exception(x) obj = Some()

Showing the method's class in expection's traceback

2008-05-18 Thread Agustin Villena
Hi! is there anyway to show the class of a method in an exception's traceback? For example, the next code class Some(object): def foo(self,x): raise Exception(x) obj = Some() obj.foo(some arg) produces the next traceback Traceback (most recent call last): File string, line 231,

Re: Showing the method's class in expection's traceback

2008-05-18 Thread Diez B. Roggisch
Agustin Villena schrieb: Hi! is there anyway to show the class of a method in an exception's traceback? For example, the next code class Some(object): def foo(self,x): raise Exception(x) obj = Some() obj.foo(some arg) produces the next traceback Traceback (most recent call