Jerzy Karczmarczuk a écrit :
> Gurus,
No guru answered, so you'll have to bear with me...
> before I am tempted to signal this as a bug, perhaps
> you might convince me that it should be so. If I type
>
> l=range(4)
> l.extend([1,2])
>
> l gives [0,1,2,3,1,2], what else...
>
> On the other h
On Friday 09 September 2005 08:29 am, Steve Holden wrote:
> Yes it is :)
That's not an argument! That's just a contradiction.
I'm not payin' for this!
--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com
--
http://mail.python.org/mailman/list
Fredrik Lundh wrote:
> Jerzy Karczmarczuk wrote:
>
>
>>Gurus, before I am tempted to signal this as a bug, perhaps
>>you might convince me that it should be so.
>
>
> it's not a bug, and nobody should have to convince you about any-
> thing; despite what you may think from reading certain slici
Op 2005-09-09, Christophe schreef <[EMAIL PROTECTED]>:
> Antoon Pardon a écrit :
>>>Because creating a new list is potentially very time-consuming and
>>>expensive of memory. Imagine you have a list of 100,000 large objects, and
>>>you want to add one more object to it. The way Python works is that
Antoon Pardon a écrit :
>>Because creating a new list is potentially very time-consuming and
>>expensive of memory. Imagine you have a list of 100,000 large objects, and
>>you want to add one more object to it. The way Python works is that append
>>and extend simply add that new object to the end o
Op 2005-09-09, Steven D'Aprano schreef <[EMAIL PROTECTED]>:
> On Fri, 09 Sep 2005 11:47:41 +0200, Jerzy Karczmarczuk wrote:
>
>> Gurus, before I am tempted to signal this as a bug, perhaps
>> you might convince me that it should be so. If I type
>>
>> l=range(4)
>> l.extend([1,2])
>>
>> l gives
On Fri, 09 Sep 2005 11:47:41 +0200, Jerzy Karczmarczuk wrote:
> Gurus, before I am tempted to signal this as a bug, perhaps
> you might convince me that it should be so. If I type
>
> l=range(4)
> l.extend([1,2])
>
> l gives [0,1,2,3,1,2], what else...
That is correct. range() returns a list.
Jerzy Karczmarczuk wrote:
> Gurus, before I am tempted to signal this as a bug, perhaps
> you might convince me that it should be so. If I type
>
> l=range(4)
> l.extend([1,2])
>
> l gives [0,1,2,3,1,2], what else...
>
> On the other hand, try
>
> p=range(4).extend([1,2])
>
> Then, p HAS NO V
Jerzy Karczmarczuk wrote:
> Gurus, before I am tempted to signal this as a bug, perhaps
> you might convince me that it should be so.
it's not a bug, and nobody should have to convince you about any-
thing; despite what you may think from reading certain slicing threads,
this mailing list is not
Jerzy Karczmarczuk kirjoitti:
> On the other hand, try
>
> p=range(4).extend([1,2])
>
> Then, p HAS NO VALUE (NoneType).
>
> With append the behaviour is similar. I didn't try other methods, but
> I suspect that it won't improve.
>
>
> WHY?
range(4) returns a list and Python's list.extend() retu
Gurus, before I am tempted to signal this as a bug, perhaps
you might convince me that it should be so. If I type
l=range(4)
l.extend([1,2])
l gives [0,1,2,3,1,2], what else...
On the other hand, try
p=range(4).extend([1,2])
Then, p HAS NO VALUE (NoneType).
With append the behaviour is simil
11 matches
Mail list logo