On 10/28/05, Guido van Rossum <[EMAIL PROTECTED]> wrote: > [Trying to cut this short... We have too many threads for this topic. :-( ] > > On 10/28/05, Nick Coghlan <[EMAIL PROTECTED]> wrote: > [on making args b/w compatible] > > I agree changing the behaviour is highly unlikely to cause any serious > > problems (mainly because anyone *caring* about the contents of args is > > rare), > > the current behaviour is relatively undocumented, and the PEP now proposes > > deprecating ex.args immediately, so Guido's well within his rights if he > > wants > > to change the behaviour. > > I take it back. Since the feature will disappear in Python 3.0 and is > maintained only for b/w compatibility, we should keep it as b/w > compatible as possible. That means it should default to () and always > have as its value exactly the positional arguments that were passed. > > OTOH, I want message to default to "", not to None (even though it > will be set to None if you explicitly pass None as the first > argument). So the constructor could be like this (until Python 3000): > > def __init__(self, *args): > self.args = args > if args: > self.message = args[0] > else: > self.message = "" > > I think Nick proposed this before as well, so let's just do this.
Yeah, but Nick used the conditional operator and I used that. All checked in. -Brett _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com