On Tue, Aug 13, 2019, at 10:49 AM, Jason Moore wrote:
> > I don't know that for sure, so maybe there is some way we could measure 
> > that.
> 
> This is something Lauren could do, a proper survey to solicit feedback 
> on docstrings/documentation from users would really help. Right now we 
> are just getting info from a few vocal speakers.
> 
> > Maybe our docstring standard should simply state that we haven't yet 
> > reached a consensus about this as a community,
> 
> If conversations about style of code/documentation of the past are any 
> indication I don't think consensus will ever be reached (at least not 
> in the way our large group arrives at consensus). I personally don't 
> think we need consensus. I'm fine with letting Lauren take in the info 
> she gets and produce a what she thinks is best. Projects like black 
> <https://black.readthedocs.io/> arose because in some sense it doesn't 
> matter what the details of the standard are, but simply that there is 
> one. For example, if we have a LaTeX heavy docstring with consistency 
> across all docstrings, I think that is better than having lack of 
> consistency and different styles in each module.

Yes, but I think it's a good occasion now to discuss and figure out a good 
solution. I am willing to write code for this, I think this is very important. 
If we can't figure this out in the next few weeks, then I agree, we will 
probably stick with LaTeX.

I like Aaron's suggestion:

.. sympy::
    Eq(uppergamma(s, x), Integral(t**(s - 1)*exp(-t), (t, x, oo)))

And to fix the := issue, why not to add this semantics to SymPy, as follows:

.. sympy::
    Def(uppergamma(s, x), Integral(t**(s - 1)*exp(-t), (t, x, oo)))

And SymPy will have the capability to convert the Def to Eq if requested, or 
anything else we deem appropriate (such as conversion to and from Fungrim).

Now take this example from our docs:

.. math::
    \Gamma(x) := \int^{\infty}_{0} t^{x-1} e^{-t} \mathrm{d}t.

And the corresponding new way:

.. sympy::
    Def(Gamma(x), Integral(t**(x-1)*exp(-t), (t, 0, oo)))

which is even 5 characters shorter. And our Sphinx extension can still convert 
it to the original LaTeX, it knows all the information.

I like this approach a lot.

Ondrej

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/49303907-5a06-4e3a-a1f3-17ac074f5475%40www.fastmail.com.

Reply via email to