[issue39094] Add a default to statistics.mean and related functions

2019-12-20 Thread Yoni Lavi


Yoni Lavi  added the comment:

Thanks for the good feedback everyone and apologies for the unresponsiveness 
over the past day.

I understand that my use cases may not reflect wider usage patterns and am not 
looking to argue against the closing. But anyway, for future reference, I'll 
add two real-life usage examples, which I should have included originally 
(again, apologies for the delay, things have been hectic).

The context is that I'm involved in running a coding bootcamp, and these are 
two recent cases when I needed a default of zero recently:

1. (Separately of the final grade calculations) We are interested in students' 
average grades on their projects as an indicator of their skills gained and 
their striving for excellence. When calculating this indicator, we use an 
average of 0 for a student who haven't yet submitted anything.

2. When providing tutoring support, we classify the "complexity" of each 
student issue, and then one of our indicators involves the average complexity 
of questions in a particular slice of time and the programme (this is 
particularly interesting around changes to the content). For this as well, a 
slice of time/programme/tutor during which there were no issues would be 
considered as having a complexity of 0.

Again, not disputing the decision to close, just adding these examples for 
future reference.
Thanks

--

___
Python tracker 
<https://bugs.python.org/issue39094>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39094] Add a default to statistics.mean and related functions

2019-12-18 Thread Yoni Lavi


Change by Yoni Lavi :


--
keywords: +patch
pull_requests: +17124
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/17657

___
Python tracker 
<https://bugs.python.org/issue39094>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39094] Add a default to statistics.mean and related functions

2019-12-18 Thread Yoni Lavi


New submission from Yoni Lavi :

I would like to put forward an argument in favour of a `default` parameter in 
the statistics.mean function and the related function. 

What motivated me to open this is that my code would more often than not 
include a check (or try-except) whenever I calculate a mean and add a 
default/sentinel value, and I felt that there should be a better way.

Please also note that we have a precedent for this in a similar parameter added 
to min & max in 3.4 (https://bugs.python.org/issue18111)

--
components: Library (Lib)
messages: 358653
nosy: Yoni Lavi
priority: normal
severity: normal
status: open
title: Add a default to statistics.mean and related functions
type: enhancement
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue39094>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22558] Missing doc links to source code for Python-coded modules.

2016-06-12 Thread Yoni Lavi

Yoni Lavi added the comment:

Created issue 27304 and uploaded a patch.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22558>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27304] Create "Source Code" links in module sections, where relevant

2016-06-12 Thread Yoni Lavi

New submission from Yoni Lavi:

This is a follow to #22558.

As per Terry's suggestion in #22558, for packages with multiple modules that 
are all documented on the same page and that currently have a "Source Code" 
link to an __init__ file (e.g. importlib), we should also add more specific 
"Source Code" links to the module sections.

Attached is a patch for the documentation of the 3 such packages that I found: 
importlib, dbm and json

--
assignee: docs@python
components: Documentation
files: mywork.patch
keywords: patch
messages: 268417
nosy: Yoni Lavi, docs@python, terry.reedy
priority: normal
severity: normal
status: open
title: Create "Source Code" links in module sections, where relevant
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43369/mywork.patch

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27304>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22558] Missing doc links to source code for Python-coded modules.

2016-06-11 Thread Yoni Lavi

Yoni Lavi added the comment:

Thank you Terry, Nathan and David for your work on this.
Sorry about the whitespace issue, I indeed forgot to run patchcheck when I 
prepared the 3rd patch.

Tery, would you like me to prepare a patch for the follow-on you suggested? If 
so, given that this one is now marked as fixed, we should open a new bug, right?

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22558>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22558] Missing doc links to source code for Python-coded modules.

2016-06-05 Thread Yoni Lavi

Yoni Lavi added the comment:

Thank you very much for the detailed review, Nathan. Attached is a new patch 
that resolves the merge issues, and some of the other issues you mentioned. 

Concerning the index reference in marshal.rst , ah, yes, I missed that it only 
related to a single paragraph. I reverted that change.

Concerning versionadded in unittest.mock-examples.rst, you're right, I saw that 
this was already available elsewhere and removed it for consistency with other 
similar intro files. I'll revert if you tell me.

I think I fixed all the smaller issues you mentioned, too. I wasn't sure about 
the fuzz; I didn't see any issue, so I assume it was automatically resolved by 
`hg update`. 

I don't have any input to give concerning the 'subjective' issues and will be 
happy to wait for a decision.

--
Added file: http://bugs.python.org/file43252/mywork3.patch

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22558>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22558] Missing doc links to source code for Python-coded modules.

2016-06-01 Thread Yoni Lavi

Yoni Lavi added the comment:

Ah, thanks for the explanation. I think in this case we're ok too.
I linked io.rst to Lib/io.py, which relies on the C version. And in the case of 
decimal.rst, it was already linked to Lib/decimal.py which very explicitly 
attempts to load the C version and falls back to _pydecimal.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22558>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22558] Missing doc links to source code for Python-coded modules.

2016-06-01 Thread Yoni Lavi

Yoni Lavi added the comment:

Thank you for looking at this.

David, concerning modules that have multiple sources, are you referring to 
modules such as `stat` and `heapq`? In these, it's the Python source that tries 
to import the C module if it's available, so I'd consider it ok to leave just a 
link to the Python source.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22558>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22558] Missing doc links to source code

2016-05-30 Thread Yoni Lavi

Yoni Lavi added the comment:

Ping. Please advise on next step to get this submitted.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22558>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22558] Missing doc links to source code

2016-05-21 Thread Yoni Lavi

Yoni Lavi added the comment:

Thank you for the review, Berker.
I removed source code links from all the modules you specifically mentioned, 
and all links to C code, including stat.rst which already had such a link 
before.

But I have to say that I don't quite understand the rationale here and (as a 
user) would personally prefer easy access to all source code, both C and 
Python. It is my opinion that a handy link to the source would help promote the 
conversion of library users to contributors.

--
Added file: http://bugs.python.org/file42933/mywork2.patch

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22558>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22558] Missing doc links to source code

2016-05-19 Thread Yoni Lavi

Yoni Lavi added the comment:

Friendly ping

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22558>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22558] Missing doc links to source code

2016-04-19 Thread Yoni Lavi

Yoni Lavi added the comment:

I went over all the library rst files and added a link to the source for each 
of the modules.

Also, I standardized the structure of the headers in all of the files to be in 
the following order: """
.. module

.. moduleauthor
.. sectionauthor

.. versionadded

**Source code:**

.. testsetup

.. index

--
"""

This'll be my first Python patch. Please let me know if I chose to go into too 
large of a scope and should split this, or if there's anything else I can 
improve. Also, since I'm modifying most of these files anyway, this might be a 
good opportunity to modify the header structure I mentioned above.

Thanks

--
keywords: +patch
Added file: http://bugs.python.org/file42527/mywork.patch

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22558>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22558] Missing doc links to source code

2016-04-19 Thread Yoni Lavi

Changes by Yoni Lavi <y...@lavi.fm>:


--
nosy: +Yoni Lavi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22558>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com