Message7138
behavior of bytearray does not match python2.7
Jython 2.7a1 (default:4f5e3c12edc0, May 16 2012, 13:40:33)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_04
Type "help", "copyright", "credits" or "license" for more information.
>>> a=bytearray(b'01')
>>> a
<bytearray object at 0x2>
>>> b=bytearray(b'23')
>>> b
<bytearray object at 0x3>
>>> a+b
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'bytearray' and 'bytearray'
Python 2.7 (r27:82500, Sep 16 2010, 18:02:00)
[GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a=bytearray(b'01')
>>> b=bytearray(b'23')
>>> a+b
bytearray(b'0123')
bytearray in jython 2.7a1 is also missing the join method. |
|
Date |
User |
Action |
Args |
2012-05-24 20:16:12 | oscar | set | recipients:
+ oscar |
2012-05-24 20:16:12 | oscar | set | messageid: <1337890572.28.0.705039114442.issue1894@psf.upfronthosting.co.za> |
2012-05-24 20:16:12 | oscar | link | issue1894 messages |
2012-05-24 20:16:11 | oscar | create | |
|