On Thu, Aug 30, 2018 at 7:03 AM Jonathan Fine <jfine2...@gmail.com> wrote:

> Hi Neil
>
> Summary: You say something should be done. But by who? Perhaps the
> should starts with you.
>

What does this mean?  Are you asking who is going to do the
implementation?  I posted here to get feedback about whether it would be a
good idea.


>
> Warning: This has been written quickly, and might have rough edges. If
> so, I apologise.
>
> You wrote
>
> > But I'm only asking for fractional powers of -1, 0, and 1.  Is that
> really a
> > complex issue?
>
> > You are right that the fractional power of -1 and 1 has multiple values,
> but
> > the fractional power of zero has a unique value.
>
> >> I'm not really sure a stdlib should even try do deal with that. If I
> want
> >> to have a symbolic way of handling complex power of fractions, I should
> >> import a specific math library whose specific job is to get this right
> (the
> >> same way if you want to do matrix stuff you have to import numpy).
>
> > That's how I use the fractions package.  If you look at my example code,
> > that seems like the kind of problem Fraction should make it easy to work
> > with.  And yet, there was a wrinkle where I had to calculate
> Fraction(-1) **
> > Fraction(a, b).
>
> Let's try to make the best of what we've got.
>
> First, the docs for the fraction module could be improved. Here's the
> page and it's history.
>
>     https://docs.python.org/3/library/fractions.html
>
> https://github.com/python/cpython/commits/3.7/Doc/library/fractions.rst
>
> Already, doing this will help users. In particular, for a different
> approach, point them to
>
>     https://www.sympy.org/en/index.html
>
> Second, assume you're right, when you say
>
> > [This sort of problem], Fraction should make it easy [...]
>
> The problem is, Python development resources are finite. They should
> be more, but they're not. It's hard to go from 'Fraction should' to
> '<specific individuals> should'. Perhaps the best one can come up with
> is the developers of fraction.py. Here's the page and history.
>
>     https://github.com/python/cpython/blob/3.7/Lib/fractions.py
>     https://github.com/python/cpython/commits/3.7/Lib/fractions.py


Thanks for linking the github.  I'm only posting on ideas to get feedback.
I think this is what the group is for.  Also, I don't know why you keep
bringing up the finite Python developer resources.  Like I said above, this
is a small change, (one that I coded below).  Besides that bit of code, I
could add a few tests, and modify the docs.  Someone would have to review
it, but it's not a big job.  The only question is: should it be done?  And
that's why I posted it here.

>
>
> Third, there is a way to go from 'Fraction should' to a group of
> persons. If you're correct, that 'Fraction should', then I'm happy to
> say that it follows that 'the Python community should'.
>
> Now, the Python community is vast. It's more than the core developers.
> I'm a member. You're a member. Everyone participating on this list is
> a member. It's got lots of resources.
>
> You want this problem solved. You've got clear ideas what should be
> done. You say it should be done. And you're a member of the Python
> community, who 'should fix this problem'.
>
> The module fractions.py is pure Python. You can fork it to develop
> your own solution, written as it should be. You can use this solution
> and share it with the community. And you can submit it as a pull
> request, for inclusion in the standard library.
>

Before I do that, I want to get feedback here.  The way I understand the
usual order with feature requests is that they are discussed, they turn
into PEPs, they are approved, they are implemented, they are reviewed, they
are checked in.  Someone will definitely correct me.  No one wants to spend
time writing documentation for code that will never be checked in.


> To summarise. You're part of the Python community, who you believe
> should solve this problem. Please, as a member of the community,
> accept some responsibility for do what you think should be done.


Maybe I'm interpreting this wrong, but what do you mean by "accept some
responsibility"?  The last time I felt strongly about a feature (PEP 448),
and after it had been approved by Guido, I spent a few months implementing
it along with Joshua Landau (https://bugs.python.org/issue2292).  Compared
to this tiny change, that was a huge change involving the parser, the
compiler, and the grammar.  I really don't understand what you're driving
at with this "accept some responsibility" comment.


>
And finally, thank you for drawing to our attention this blemish in
> the fractions module (or its documentation).
>
> --
> Jonathan
>
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to