A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/1999-December/001703.html below:

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib getopt.py,1.7,1.8

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib getopt.py,1.7,1.8Guido van Rossum guido@CNRI.Reston.VA.US
Tue, 21 Dec 1999 18:05:28 -0500
> Guido van Rossum writes:
>  > + 
>  > + class GetoptError(Exception):
>  > +     opt = ''
>  > +     msg = ''
>  > +     def __init__(self, *args):
>  > +         self.args = args
>  > +         if len(args) == 1:
>  > +             self.msg = args[0]
>  > +         elif len(args) == 2:
>  > +             self.msg = args[0]
>  > +             self.opt = args[1]
>  > + 
>  > +     def __str__(self):
>  > +         return self.msg
>  >   
>  > ! error = GetoptError # backward compatibility

[Fred Drake]

>   This breaks as soon as the standard exceptions are strings; does
> this mean -X will be removed in the next release?  (Please????)

Not a bad idea.

Anybody got a reason why -X should stay?

(The next step would be to outlaw raise with a string argument; I
think I can't make that for 1.6.  But it would be a good idea to scan
the standard library for string exceptions and convert all of them.)

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4