This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients
Date 2004-08-05.16:10:50
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=593130

Duh, my turn to forget. For any beginners reading this ...
>>> class ms(str): pass
...
>>> a=ms('a')
>>> type(''.join((a,)))
<class '__main__.ms'>

Expanding mhw's second point:

>>> e=ms()
>>> type(e)
<class '__main__.ms'>
>>> import copy
>>> e2=copy.copy(e)
>>> type(e2)
<class '__main__.ms'>
>>> e3=e[:]
>>> type(e3)
<type 'str'>
>>> id(e),id(e2),id(e3)
(9494608, 9009936, 8577440)

so [:] is not exactly an abbreviated synonym for copy().  Is 
this a butg?  (I haven't rechecked the respective docs yet.)

One reason I hesitate to call the OP's original observation a 
bug is that the whole sujbect of operations on subtype 
instances seems not completely baked.  Knowing the result 
types in all cases may require experiments as well as doc 
reading.
History
Date User Action Args
2007-08-23 14:24:40adminlinkissue1001011 messages
2007-08-23 14:24:40admincreate