Message109028
array2.diff:
- can you reindent the line "Py_ssize_t old_size = Py_SIZE(self);"?(even if it's not part of your patch)
- you can avoid the "char *str;" variable (use directly buffer.buf)
--
> I changed "s#" to "y*". This means that str arguments are no longer
> accepted by fromstring (...) it is an incompatible change
It's maybe time to create .frombytes() and .tobytes() methods:
- .tostring() will be a (deprecated?) alias to .tobytes()
- .frombytes() only accepts bytes, bytearray and buffer compatible objects: use "y*" format
- .fromstring() accepts str, bytes, bytearray and buffer compatible objects (encode str to utf-8): use "s*" format
But I still don't understand why array.fromstring() accepts character strings. So an easier solution is to apply array2.diff to Python 3.2, and replace "y*" by "s*" when the patch is applied to 3.1. |
|
Date |
User |
Action |
Args |
2010-07-01 02:30:20 | vstinner | set | recipients:
+ vstinner, terry.reedy, belopolsky, pitrou, tjollans |
2010-07-01 02:30:20 | vstinner | set | messageid: <1277951420.01.0.164184159322.issue8990@psf.upfronthosting.co.za> |
2010-07-01 02:30:17 | vstinner | link | issue8990 messages |
2010-07-01 02:30:15 | vstinner | create | |
|