[issue33040] Make itertools.islice supports negative values for start and stop arguments for sized iterable object

2018-03-12 Thread TitanSnow
TitanSnow <tttnns1...@gmail.com> added the comment: Now I have thought about it and realized that it's not suitable for islice. But there's still a common use case to drop some elements from the beginning or ending of a iterable, which is also a main reason why I wanted islice to s

[issue12345] Add math.tau

2018-03-10 Thread TitanSnow
Change by TitanSnow <tttnns1...@gmail.com>: -- pull_requests: +5816 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue12345> ___ _

[issue32917] ConfigParser writes a superfluous final blank line

2018-03-10 Thread TitanSnow
TitanSnow <tttnns1...@gmail.com> added the comment: For the case of sequential writes to the same file, I think it’s a invalid use case. The file can be created or modified by user or other applications, breaking the assume of ConfigParser. It’s better to have a method to merge two Config

[issue32917] ConfigParser writes a superfluous final blank line

2018-03-10 Thread TitanSnow
TitanSnow <tttnns1...@gmail.com> added the comment: > But I didn't thought that a superfluous final blank line causes any problems. > What software has a problem with it? Currently I have not found a program that has problem with the superfluous final blank line, and I think

[issue33040] Make itertools.islice supports negative values for start and stop arguments for sized iterable object

2018-03-10 Thread TitanSnow
New submission from TitanSnow <tttnns1...@gmail.com>: ``islice()`` does not support negative values for start or stop, which does not matter for plain iterators. However, for some cases, we have a sized iterable object which is not subscriptable, using ``islice()`` makes code ugly::

[issue32917] ConfigParser writes a superfluous final blank line

2018-03-09 Thread TitanSnow
TitanSnow <tttnns1...@gmail.com> added the comment: If we treat the original behavior as a bug, it’s much easier to write a patch that just changes the default behavior and never outputs a final blank line. I have looked through the testsuite of it. It seems that the original author ha

[issue32917] ConfigParser writes a superfluous final blank line

2018-03-09 Thread TitanSnow
TitanSnow <tttnns1...@gmail.com> added the comment: I’m afraid of breaking the backward compatibility. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32930] [help][webbrowser always opens new tab. I want to open in the same tab]

2018-02-24 Thread TitanSnow
TitanSnow <tttnns1...@gmail.com> added the comment: Yes, I think so. Maybe, in a web application, to achieve this, the way is to use a GUI library then use its web view widget. -- ___ Python tracker <rep...@bugs.python.org> <https://

[issue32930] [help][webbrowser always opens new tab. I want to open in the same tab]

2018-02-24 Thread TitanSnow
TitanSnow <tttnns1...@gmail.com> added the comment: Hi Cheryl, I think you may misunderstand. What it means is to open URL in the *same tab*, not *same window*, which is not described in documentation. Hi Tommy, It’s hard to say what is “the same tab”. Is it the current tab or the tab

[issue32917] ConfigParser writes a superfluous final blank line

2018-02-23 Thread TitanSnow
Change by TitanSnow <tttnns1...@gmail.com>: Removed file: https://bugs.python.org/file47461/bpo-32917.patch ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32917] ConfigParser writes a superfluous final blank line

2018-02-23 Thread TitanSnow
Change by TitanSnow <tttnns1...@gmail.com>: -- pull_requests: +5621 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue12345] Add math.tau

2018-02-23 Thread TitanSnow
Change by TitanSnow <tttnns1...@gmail.com>: -- pull_requests: +5622 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue12345> ___ _

[issue32917] ConfigParser writes a superfluous final blank line

2018-02-23 Thread TitanSnow
Change by TitanSnow <tttnns1...@gmail.com>: Removed file: https://bugs.python.org/file47460/final_blank_line.patch ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32917] ConfigParser writes a superfluous final blank line

2018-02-23 Thread TitanSnow
TitanSnow <tttnns1...@gmail.com> added the comment: Patch updated, included documentation and tests. -- Added file: https://bugs.python.org/file47461/bpo-32917.patch ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32917] ConfigParser writes a superfluous final blank line

2018-02-22 Thread TitanSnow
TitanSnow <tttnns1...@gmail.com> added the comment: **It's not final newline \n !** Maybe what I said confused. The "final blank line" does not mean the "final newline char". It means an extra blank line after last line. It might be clearer to represent it in a stri

[issue32917] ConfigParser writes a superfluous final blank line

2018-02-22 Thread TitanSnow
New submission from TitanSnow <tttnns1...@gmail.com>: ``ConfigParser.write()`` writes a superfluous final blank line. Example:: import configparser cp = configparser.ConfigParser() cp['section1'] = {'key': 'value'} cp['section2'] = {'key': 'value'} wit