Re: Python error codes and messages location

2013-05-28 Thread Fábio Santos
On 29 May 2013 00:44, "Dennis Lee Bieber" wrote: > > On Tue, 28 May 2013 17:15:51 +1000, Chris Angelico > declaimed the following in gmane.comp.python.general: > > > > Can we internationalize English instead of localizing Python? > > > > Not-entirely-joking-ly yours, > > > All that is req

Re: Python error codes and messages location

2013-05-28 Thread Fábio Santos
On 28 May 2013 09:22, "Chris Angelico" wrote: > > On Tue, May 28, 2013 at 6:10 PM, Fábio Santos wrote: > > Just to clarify, I am suggesting to have the unchanged messages in > > tracebacks, but having some methods in the exception to get the exception > > and message localised. Just like repr() a

Re: Python error codes and messages location

2013-05-28 Thread Serhiy Storchaka
28.05.13 11:17, Chris Angelico написав(ла): On Tue, May 28, 2013 at 6:10 PM, Fábio Santos wrote: Just to clarify, I am suggesting to have the unchanged messages in tracebacks, but having some methods in the exception to get the exception and message localised. Just like repr() and str() are dir

Re: Python error codes and messages location

2013-05-28 Thread Steven D'Aprano
On Tue, 28 May 2013 17:15:51 +1000, Chris Angelico wrote: > Can we internationalize English instead of localizing Python? We have. English is the primary international language for programmers. (For which I am profoundly grateful.) Japanese is also a pretty important language, but mostly in Jap

Re: Python error codes and messages location

2013-05-28 Thread Chris Angelico
On Tue, May 28, 2013 at 6:10 PM, Fábio Santos wrote: > Just to clarify, I am suggesting to have the unchanged messages in > tracebacks, but having some methods in the exception to get the exception > and message localised. Just like repr() and str() are directed at different > audiences (the progr

Re: Python error codes and messages location

2013-05-28 Thread Fábio Santos
On 28 May 2013 08:19, "Chris Angelico" wrote: > > On Tue, May 28, 2013 at 4:57 PM, Fábio Santos wrote: > > > > On 28 May 2013 05:17, "Vito De Tullio" wrote: > >> I really hope really far... have you never tried to google a localized > >> error > >> message? :\ > > > > Never. I don't even try. >

Re: Python error codes and messages location

2013-05-28 Thread Chris Angelico
On Tue, May 28, 2013 at 4:57 PM, Fábio Santos wrote: > > On 28 May 2013 05:17, "Vito De Tullio" wrote: >> I really hope really far... have you never tried to google a localized >> error >> message? :\ > > Never. I don't even try. Same happens when someone pastes an error onto a mailing list like

Re: Python error codes and messages location

2013-05-28 Thread Fábio Santos
On 28 May 2013 05:17, "Vito De Tullio" wrote: > > Fábio Santos wrote: > > >> > > Speaking of PEPs and exceptions. When do we get localized exceptions? > >> > > >> > What do you mean by "localized exceptions"? > >> > > >> > Please, tell me it's *NOT* a proposal to send the exception message in > >>

Re: Python error codes and messages location

2013-05-27 Thread Vito De Tullio
Fábio Santos wrote: >> > > Speaking of PEPs and exceptions. When do we get localized exceptions? >> > >> > What do you mean by "localized exceptions"? >> > >> > Please, tell me it's *NOT* a proposal to send the exception message in >> > the >> > locale language! >> It is. I think I read it mention

Re: Python error codes and messages location

2013-05-27 Thread Fábio Santos
On 27 May 2013 19:36, "Fábio Santos" wrote: > > > On 27 May 2013 19:23, "Vito De Tullio" wrote: > > > > Fábio Santos wrote: > > > > >> This should make life easier for us > > > http://docs.python.org/3/whatsnew/3.3.html#pep-3151-reworking-the-os-and-io-exception-hierarchy > > > > > > Speaking of

Re: Python error codes and messages location

2013-05-27 Thread Fábio Santos
On 27 May 2013 19:23, "Vito De Tullio" wrote: > > Fábio Santos wrote: > > >> This should make life easier for us > > http://docs.python.org/3/whatsnew/3.3.html#pep-3151-reworking-the-os-and-io-exception-hierarchy > > > > Speaking of PEPs and exceptions. When do we get localized exceptions? > > Wha

Re: Python error codes and messages location

2013-05-27 Thread Vito De Tullio
Fábio Santos wrote: >> This should make life easier for us > http://docs.python.org/3/whatsnew/3.3.html#pep-3151-reworking-the-os-and-io-exception-hierarchy > > Speaking of PEPs and exceptions. When do we get localized exceptions? What do you mean by "localized exceptions"? Please, tell me it's

Re: Python error codes and messages location

2013-05-27 Thread Terry Jan Reedy
On 5/27/2013 12:54 PM, Carlos Nepomuceno wrote: I think PEP 3151 is a step ahead! That's almost exactly what I was looking for. Why did it take so long to have that implemented? Since this PEP involved changing existing features, rather than adding som

Re: Python error codes and messages location

2013-05-27 Thread Mark Lawrence
On 27/05/2013 17:54, Carlos Nepomuceno wrote: I think PEP 3151 is a step ahead! That's almost exactly what I was looking for. Why did it take so long to have that implemented? Lack of volunteers. -- If you're using GoogleCrap™ please read this http:/

RE: Python error codes and messages location

2013-05-27 Thread Carlos Nepomuceno
Thanks so much guys! I'm not planning to prepare for every possible situation, but I certainly am responsible to handle most common errors. So it's really important to know what a function/method returns when called. Exception handling may take lots of code, but I'm used to it. It's much better

Re: Python error codes and messages location

2013-05-27 Thread Fábio Santos
On Mon, May 27, 2013 at 2:11 PM, Steven D'Aprano wrote: > On Mon, 27 May 2013 13:46:50 +0100, Fábio Santos wrote: > >> Speaking of PEPs and exceptions. When do we get localized exceptions? > > > We're waiting for you to volunteer. When can you start? I'd love to work on that but my C is too shabb

Re: Python error codes and messages location

2013-05-27 Thread Steven D'Aprano
On Mon, 27 May 2013 13:46:50 +0100, Fábio Santos wrote: > Speaking of PEPs and exceptions. When do we get localized exceptions? We're waiting for you to volunteer. When can you start? -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Python error codes and messages location

2013-05-27 Thread Fábio Santos
On 27 May 2013 12:41, "Mark Lawrence" wrote: > This should make life easier for us http://docs.python.org/3/whatsnew/3.3.html#pep-3151-reworking-the-os-and-io-exception-hierarchy Speaking of PEPs and exceptions. When do we get localized exceptions? -- http://mail.python.org/mailman/listinfo/pyth

Re: Python error codes and messages location

2013-05-27 Thread Mark Lawrence
On 27/05/2013 07:11, Cameron Simpson wrote: BTW, I recommend importing "errno" and using symbolic names. It makes things much more readable, and accomodates the situation where the symbols map to different numbers on different platforms. And have a catch-all. For example: Cheers, This shou

Re: Python error codes and messages location

2013-05-27 Thread Chris Angelico
On Mon, May 27, 2013 at 4:11 PM, Cameron Simpson wrote: > On 27May2013 04:49, Carlos Nepomuceno wrote: > | That's bad! I'd like to check all the IOError codes that may be > | raised by a function/method but the information isn't there. > > No, you really don't. Heh. I concur. Opening a file can

Re: Python error codes and messages location

2013-05-26 Thread Cameron Simpson
On 27May2013 04:49, Carlos Nepomuceno wrote: | > From: steve+comp.lang.pyt...@pearwood.info | > On Mon, 27 May 2013 02:13:54 +0300, Carlos Nepomuceno wrote: | >> Where can I find all error codes and messages that Python throws (actual | >> codes and messages from exceptions raised by stdlib)? | >

Re: Python error codes and messages location

2013-05-26 Thread Cameron Simpson
On 27May2013 00:53, Steven D'Aprano wrote: | On Mon, 27 May 2013 02:13:54 +0300, Carlos Nepomuceno wrote: | > Where can I find all error codes and messages that Python throws (actual | > codes and messages from exceptions raised by stdlib)? | | There is no list. It is subject to change from vers

RE: Python error codes and messages location

2013-05-26 Thread Carlos Nepomuceno
> From: steve+comp.lang.pyt...@pearwood.info > Subject: Re: Python error codes and messages location > Date: Mon, 27 May 2013 00:53:41 + > To: python-list@python.org > > On Mon, 27 May 2013 02:13:54 +0300, Carlos Nepomuceno wrote: >

Re: Python error codes and messages location

2013-05-26 Thread Steven D'Aprano
On Mon, 27 May 2013 02:13:54 +0300, Carlos Nepomuceno wrote: > Where can I find all error codes and messages that Python throws (actual > codes and messages from exceptions raised by stdlib)? There is no list. It is subject to change from version to version, including point releases. Many funct