Re: [Python-Dev] int() and math.trunc don't accept objects that only define __index__

2019-02-22 Thread Nick Coghlan
On Fri, 22 Feb 2019 at 18:29, Serhiy Storchaka wrote: > Should we add default implementations of __float__ and __complex__ when > either __index__ or __int__ is defined? Currently: > > >>> class A: > ... def __int__(self): return 42 > ... > >>> int(A()) > 42 > >>> float(A()) > Traceback (mo

Re: [Python-Dev] "Good first issues" on the bug tracker

2019-02-22 Thread Karthikeyan
I would also suggest cleaning up the existing set of easy issues where the issues was tagged as easy initially followed by discussion about how the though easy has other concerns like backwards compatibility due to which it can't be merged. It's getting hard to get more easy issues and what could s

Re: [Python-Dev] "Good first issues" on the bug tracker

2019-02-22 Thread Victor Stinner
Hi, Let me share with you (this mailing list) my experience with mentoring and what we call "easy issue". First of all, almost all "easy issues" are very hard issues: issues open for longer than one year, with many comments, and nobody succeeded to come up with a solution (well, otherwise the issu

Re: [Python-Dev] int() and math.trunc don't accept objects that only define __index__

2019-02-22 Thread Serhiy Storchaka
18.02.19 18:16, Rémi Lapeyre пише: The documentation mentions at https://docs.python.org/3/reference/datamodel.html#object.__index__ the need to always define both __index__ and __int__:     Note: In order to have a coherent integer type class, when __index__() is defined __int__() should als