View Full Version : توضیح نوع های :bytes , bytearray
pumper
شنبه 05 آذر 1390, 18:12 عصر
سلام اگه ممکنه در مورد این دو نوع داده یه توضیح مفصل بدید
ehp_kz6597
یک شنبه 06 آذر 1390, 09:03 صبح
کلا توضیح خاصی درمورد تفاوت هاشون وجود نداره . یه چیز تو مایه های تفاوت tuple و list هست . ولی :
bytearray
Return a new array of bytes. The bytearray type is a mutable sequence of integers in the range 0 <= x < 256
bytes
Return a new “bytes” object, which is an immutable sequence of integers in the range 0 <= x < 256.
bytes is an immutable version of bytearray – it has the same non-mutating methods and the same indexing and slicing behavior.
ehp_kz6597
یک شنبه 06 آذر 1390, 09:10 صبح
اینها رو هم ببین :
Memory efficient Python with bytearray (http://blog.ez2learn.com/2010/04/22/memory-efficient-python-with-bytearray/)
bytes vs bytearray in Python 2.6 and 3 (file:///D:/IT/programing/python/bytearray/bytes-vs-bytearray-in-python-2-6-and-3.htm)
A few useful bytearray tricks (http://dabeaz.blogspot.com/2010/01/few-useful-bytearray-tricks.html)
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.