Commit Graph

48 Commits

Author SHA1 Message Date
Antonio Yang
0f4c2c10b7 byte.decode
- support ascii, utf-8 encoding
- raise LookupError for unhandled encoding
2019-08-01 22:57:17 +08:00
Y. Sapir
87844ff434 Implement bytes.__mul__ and __rmul__ 2019-05-09 23:51:20 +03:00
jgirardet
dc18356947 add bytes/byterray title 2019-05-06 21:37:15 +02:00
Windel Bouwman
567fc4e94f Merge pull request #916 from jgirardet/bytergevalue
rewrite pybytearray with pybyteinner
2019-05-06 18:09:12 +02:00
jgirardet
5864c6e063 rewrite pybytearray with pybyteinner 2019-05-04 01:14:08 +02:00
Jimmy Girardet
cf70323475 add replace 2019-04-30 20:24:12 +02:00
Jimmy Girardet
b60d7413b9 add zfill 2019-04-30 20:24:12 +02:00
jgirardet
29f674fa1d fix split with empty bytes 2019-04-30 20:24:12 +02:00
jgirardet
d89ca3c3e4 add spitlines 2019-04-30 20:24:12 +02:00
jgirardet
434985d6d0 add partition/reparition refactor split/rsplit 2019-04-30 20:24:12 +02:00
jgirardet
0af8ad05eb add expandstab 2019-04-30 20:24:12 +02:00
jgirardet
cfff7cbd63 add split and rsplit 2019-04-30 20:24:12 +02:00
jgirardet
61ee15b97b add strip lstrip rstrip 2019-04-19 00:04:39 +02:00
jgirardet
9ea823abf1 add rfind, rindex 2019-04-18 23:06:11 +02:00
jgirardet
8a2ce9e260 add swapcase 2019-04-18 21:58:15 +02:00
jgirardet
a42bfae84d kwargs for translate 2019-04-18 21:41:46 +02:00
jgirardet
56c5790745 reformat center, ljsut, rjust args 2019-04-18 21:00:33 +02:00
jgirardet
8bcdbbf21b use PyInt Ref, add ljust, rjust 2019-04-18 19:52:17 +02:00
jgirardet
ba67f3c264 refactore fromhex 2019-04-18 19:25:45 +02:00
jgirardet
473ae24199 use PyStringRef in new 2019-04-18 17:31:58 +02:00
jgirardet
84d61a9212 bytes.new with kwargs 2019-04-18 14:56:47 +02:00
jgirardet
8693adcd61 handle None case for bytes.translate 2019-04-18 14:15:13 +02:00
Jimmy Girardet
0b283102a6 add translate 2019-04-18 14:15:13 +02:00
Jimmy Girardet
ced6f15a59 add bytes.makertans 2019-04-18 14:15:13 +02:00
Jimmy Girardet
bd2166789d add bytes index and find 2019-04-18 14:15:13 +02:00
Jimmy Girardet
8a7c46da7b add endswith startswith 2019-04-18 14:15:13 +02:00
Jimmy Girardet
14658b6236 move is_byte to try_as_byte
move trait IsByte to ByteOr
refactor center
refactor count
fix center with negative value
add test for count(integer)
2019-04-18 14:15:13 +02:00
jgirardet
5f5d5c4278 add bytes.join 2019-04-18 14:15:13 +02:00
jgirardet
00cf524814 add slice capability to bytes. add trait IsByte 2019-04-18 14:15:13 +02:00
jgirardet
c550360be5 add is_bytes_like add bytes.count wthout slice 2019-04-18 14:15:13 +02:00
Jimmy Girardet
9c57ae4046 support bytes creation from hex and ascii 2019-04-17 15:28:14 +02:00
jgirardet
73dbcfbe01 Add bytes.center
fix str.center
add some tests
introduce is_byte
2019-04-13 08:23:40 +02:00
jgirardet
bd78f7e12b add capitalize 2019-04-13 08:21:37 +02:00
jgirardet
9d25a216de fix some tests, run clippy 2019-04-10 21:39:16 +02:00
Jimmy Girardet
54c7335f1c SyntaxError for non ascii char 2019-04-10 18:05:28 +02:00
jgirardet
751c3d52e2 use vec! for int arg in bytes new 2019-04-10 13:24:31 +02:00
Jimmy Girardet
977f56ade1 add bytes.fromhex 2019-04-10 10:08:10 +02:00
Jimmy Girardet
5cc83a35aa hex 2019-04-09 17:08:38 +02:00
Jimmy Girardet
9b763072fe add upper lower 2019-04-09 16:23:56 +02:00
Jimmy Girardet
2940c7cc28 add islpaha isalnum isdigit islower isupper isspace istitle 2019-04-09 14:33:29 +02:00
jgirardet
b535958310 add getitem, fix contain error_message 2019-04-08 23:12:40 +02:00
jgirardet
8232a4d285 finish contains 2019-04-08 21:27:44 +02:00
jgirardet
ec65b8480f add contains 2019-04-08 00:45:53 +02:00
jgirardet
3c736c1f94 iter 2019-04-08 00:11:20 +02:00
jgirardet
dddf9fee39 gt lt ge le 2019-04-07 22:42:47 +02:00
jgirardet
ec98b4d6bf repr len eq 2019-04-07 22:36:13 +02:00
jgirardet
2eb8e7bf2b new ok for pybytes 2019-04-07 18:55:35 +02:00
Joey Hain
c2d04f97d8 bytes: add tests for NotImplemented 2019-03-30 13:33:50 -07:00