[issue39054] Add an parameter to list.remove()

2019-12-15 Thread Lovi
New submission from Lovi <1668151...@qq.com>: I think the list can add a parameter to remove(): remove(value, appear_time=1, /) The parameter appear_time indicates the number of times the value appears in the list. I want this effect: >>> list1 = [1, 2, 3, 2, 1, 2, 1] >

[issue39046] collections.abc.Reversible should not be a subclass of Hashable

2019-12-14 Thread Lovi
Change by Lovi <1668151...@qq.com>: -- nosy: +lovi versions: -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue39046> ___ ___ Pyth

[issue39045] Segmentation of string

2019-12-13 Thread Lovi
New submission from Lovi <1668151...@qq.com>: I thought for a long time. I think it's necessary to add a segment method to str type or string module. This method is used to split a string into m parts and return all cases. For example: segment('1234', m=3) -> [('1', '2', '34'),

[issue39043] Add math.fib() generator

2019-12-13 Thread Lovi
New submission from Lovi <1668151...@qq.com>: I think it's appropriate to add the generator fib() to the math module. With fib(), some operations will be easier. The generator is like this: def fib(count=None): if count is not None and not isinstance(count, int): raise Valu

[issue39036] Add center_char attribute to str type

2019-12-13 Thread Lovi
Lovi <1668151...@qq.com> added the comment: Sorry, I made a mistake. The center char of '12345' is '3' and the center char of 'abcd' is '' because it doesn't have the most central character. In my opinion, with center_char, when you need the center character of a string you c

[issue39036] Add center_char attribute to str type

2019-12-13 Thread Lovi
New submission from Lovi <1668151...@qq.com>: I think Python3.9 needs to add the center_char attribute which means the center character of strings to string type, such as the center_char of '12345' is '1' and the center_char of 'abcd' is 'bc'. -- components: Windows messages: