[issue32972] unittest.TestCase coroutine support

2018-03-10 Thread Petter S
Change by Petter S : -- keywords: +patch pull_requests: +5812 stage: -> patch review ___ Python tracker ___

[issue32917] ConfigParser writes a superfluous final blank line

2018-03-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I thought a blank line between sections is just for readability, and no program will break if drop it. Removing the final blank line can harm the readability in the case of sequential writes to the same file (unless we detect

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

2018-03-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not think this is suitable for the itertools module. It is designed to work with iterators, i.e. with objects that support the iterator protocol. What if the iterable change the size during iteration? Should the islice

[issue32917] ConfigParser writes a superfluous final blank line

2018-03-10 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Sat, Mar 10, 2018 at 06:37:28AM +, TitanSnow wrote: > > TitanSnow 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

[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 : ``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:: d =

[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-03-10 Thread Nick Coghlan
Nick Coghlan added the comment: I think __trunc__ is special here, as it's called by a built-in type constructor, whereas __floor__ and __ceil__ really are specific to their respective math module functions. That said, I also wouldn't be opposed to listing all 4 methods

[issue33039] int() and math.trunc don't accept objects that only define __index__

2018-03-10 Thread Nick Coghlan
New submission from Nick Coghlan : (Note: I haven't categorised this yet, as I'm not sure how it *should* be categorised) Back when the __index__/nb_index slot was added, the focus was on allowing 3rd party integer types to be used in places where potentially lossy

[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-03-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +5811 ___ Python tracker ___

[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-03-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +5810 ___ Python tracker ___

[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-03-10 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 308eab979d153f1ab934383dc08bc4546ced8b6c by Nick Coghlan (Eric Appelt) in branch 'master': bpo-26701: Add documentation for __trunc__ (GH-6022) https://github.com/python/cpython/commit/308eab979d153f1ab934383dc08bc4546ced8b6c

<    1   2