On Wed, 21 Sep 2005 11:37:38 +0100, Tom Anderson wrote:
> There's a special hell for people who override builtins.
[slaps head]
Of course there is, and I will burn in it for ever...
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 21 Sep 2005, Steven D'Aprano wrote:
> On Mon, 19 Sep 2005 19:40:12 -0700, jbperez808 wrote:
>
>> Having to do an array.array('c',...):
>>
>> >>> x=array.array('c','ATCTGACGTC')
>> >>> x[1:9:2]=array.array('c','')
>> >>> x.tostring()
>> 'AACAGACATC'
>>
>> is a bit klunkier than one
On Mon, 19 Sep 2005 19:40:12 -0700, jbperez808 wrote:
> Having to do an array.array('c',...):
>
> >>> x=array.array('c','ATCTGACGTC')
> >>> x[1:9:2]=array.array('c','')
> >>> x.tostring()
> 'AACAGACATC'
>
> is a bit klunkier than one would want, but I guess
> the efficient performanc
Great suggestion... I was naively trying to turn the string into a list
and slice
that which I reckon would be significantly slower.
--
http://mail.python.org/mailman/listinfo/python-list
Having to do an array.array('c',...):
>>> x=array.array('c','ATCTGACGTC')
>>> x[1:9:2]=array.array('c','')
>>> x.tostring()
'AACAGACATC'
is a bit klunkier than one would want, but I guess
the efficient performance is the silver lining here.
--
http://mail.python.org/mailman/listinfo
"Reinhold Birkenfeld" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
> [EMAIL PROTECTED] wrote:
> rs='AUGCUAGACGUGGAGUAG'
> rs[12:15]='GAG'
>> Traceback (most recent call last):
>> File "", line 1, in ?
>> rs[12:15]='GAG'
>> TypeError: object doesn't support slice assig