Python 3.0 alpha2
Python 3.0 alpha2 で変更が入った bytes をチェック. bytes の __getnewargs__ は何に使うものなのかなあ. bytearray の __alloc__ もキャパシティーの設定が出来ないのでいまいち使い道が.
$ /usr/local/entity/python-3.0a2/bin/python Python 3.0a2 (r30a2:59382, Dec 8 2007, 18:45:40) [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> [i for i in dir(bytearray) if not i in dir(bytes)] ['__alloc__', '__delitem__', '__iadd__', '__imul__', '__setitem__', 'append', 'extend', 'insert', 'pop', 'remove', 'reverse'] >>> [i for i in dir(bytes) if not i in dir(bytearray)] ['__getnewargs__'] >>> type(b'hoge') <type 'bytes'> >>> b'hoge'.__getnewargs__() ('hoge',) >>> type(b'hoge'.__getnewargs__()[0]) <type 'str'> >>> bytearray(b'hoge').__alloc__() 5