On Dec 28, 1:34 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Thu, 27 Dec 2007 16:38:07 -0300, <[EMAIL PROTECTED]> escribió:
>
>
>
> > On Dec 27, 8:20 pm, Wildemar Wildenburger
> > <[EMAIL PROTECTED]> wrote:
>
> >> From that post:
> >> > Ok, I do admit that doing
>
> >> > a = ([1], 2)
En Thu, 27 Dec 2007 16:38:07 -0300, <[EMAIL PROTECTED]> escribió:
> On Dec 27, 8:20 pm, Wildemar Wildenburger
> <[EMAIL PROTECTED]> wrote:
>> >
>>
>> From that post:
>> > Ok, I do admit that doing
>> >
>> > a = ([1], 2)
>> > a[0].append(2)
>> >
>> > also doesn't throw an error, but this onl
Carl Banks wrote:
> On Dec 27, 12:38 pm, [EMAIL PROTECTED] wrote:
>> After some tought I must agree that this is a wart more than
>> a bug and that it will probably be best not to mess with it.
>> However, what do you guys think about the print wart in Py3k
>> described
>> athttp://filoxus.blogspo
On Dec 27, 12:38 pm, [EMAIL PROTECTED] wrote:
> After some tought I must agree that this is a wart more than
> a bug and that it will probably be best not to mess with it.
> However, what do you guys think about the print wart in Py3k
> described
> athttp://filoxus.blogspot.com/2007/12/python-3000
On Dec 27, 8:20 pm, Wildemar Wildenburger
<[EMAIL PROTECTED]> wrote:
> >
>
> From that post:
> > Ok, I do admit that doing
> >
> > a = ([1], 2)
> > a[0].append(2)
> >
> > also doesn't throw an error, but this only confuses me more.
> >
> Why? You mutate thelist, but thetupledoes not chan
Subject: Re: list in a tuple
To:
Cc:
Bcc:
Reply-To:
Newsgroup: comp.lang.python
-=-=-=-=-=-=-=-=-=# Don't remove this line #=-=-=-=-=-=-=-=-=-
[EMAIL PROTECTED] wrote:
> After some tought I must agree that this is a wart more than
> a bug and that it will probably be best not to m
After some tought I must agree that this is a wart more than
a bug and that it will probably be best not to mess with it.
However, what do you guys think about the print wart in Py3k
described at
http://filoxus.blogspot.com/2007/12/python-3000-how-mutable-is-immutable.html#links
(im not trying to
On Dec 26, 1:08 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Mon, 24 Dec 2007 18:01:53 -0800, Raymond Hettinger wrote:
[...]
> > The first succeeds and the second fails.
>
> And this is a good idea?
>
> Shouldn't the tuple assignment raise the exception BEFORE calling
> __
On Mon, 24 Dec 2007 18:01:53 -0800, Raymond Hettinger wrote:
>> Currently, Python raises an error *and* changes the first element of
>> the tuple. Now, this seems like something one would want to change -
>> why raise an error *and* execute the thing it was complaining about?
>
> Yawn. Multiple
On Dec 24, 8:22 am, [EMAIL PROTECTED] wrote:
> Recently, I got into a debate on programming.reddit.com about
> what should happen in the following case:
>
> >>> a = ([1], 2)
> >>> a[0] += [3]
>
> Currently, Python raises an error *and* changes the first element of
> the tuple. Now, this seems like
On Dec 24, 4:13 pm, [EMAIL PROTECTED] wrote:
> Like I said, it is clear *why* this happens, what I
> am concerned is if this what we *want* to happen, i.e.,
> if the current situation is satisfying. Your mytuple class
> would be something that resembles a solution, my question
> is what the people
On Dec 24, 4:08 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
[...]
> class mytuple(tuple):
> "It's ok to do t[i] = obj as long as t[i] was already obj"
> def __setitem__(self, i, val):
> if self[i] is not val:
> raise TypeError("'mytuple' object is immutable")
>
> So:
Like I said, it is clear *why* this happens, what I
am concerned is if this what we *want* to happen, i.e.,
if the current situation is satisfying. Your mytuple class
would be something that resembles a solution, my question
is what the people on this group think about it.
On Dec 24, 5:08 pm, Arna
On Dec 24, 3:22 pm, [EMAIL PROTECTED] wrote:
> Recently, I got into a debate on programming.reddit.com about
> what should happen in the following case:
>
> >>> a = ([1], 2)
> >>> a[0] += [3]
>
> Currently, Python raises an error *and* changes the first element of
> the tuple. Now, this seems like
Recently, I got into a debate on programming.reddit.com about
what should happen in the following case:
>>> a = ([1], 2)
>>> a[0] += [3]
Currently, Python raises an error *and* changes the first element of
the tuple. Now, this seems like something one would want to
change - why raise an error *an
15 matches
Mail list logo