[issue33129] Add kwarg-only option to dataclass

2020-07-22 Thread Prakhar Goel


Prakhar Goel  added the comment:

Hi,

As another piece of evidence: I run into this problem _all the time_. Whenever 
I need a field in the parent with a default, I either need to add bogus default 
values for every field in every subclass or just skip the default in the parent.

I'd like to suggest a middle ground:
1. A field level keyword_only option which forces just that field to be a 
kw-only field (for every subclass as well).
2. A class level keyword_only option that does:
2a. False (default) means current behavior where classes are not keyword only 
(but may be forced to be by the field specific arg).
2b. True means all the fields in this class (but not the subclasses!) Would be 
marked as keyword only. This does affect the order of arguments in the init 
method but that seems acceptable given that keyword only parameters are 
conceptually order independent.
2c. None implies that precisely the fields with a default (or default_factory) 
should be keyword only fields.

Thoughts?

--
nosy: +Prakhar Goel

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



[issue36314] Pivot_Table Docstring Error

2019-03-16 Thread Prakhar


New submission from Prakhar :

In the docstring of Pivot_table,np.median function should be used instead of 
np.mean.

File attached for reference.

--
files: Screenshot 2019-03-16 at 4.15.25 PM.png
messages: 338077
nosy: prakharb
priority: normal
severity: normal
status: open
title: Pivot_Table Docstring Error
type: enhancement
versions: Python 3.7
Added file: https://bugs.python.org/file48210/Screenshot 2019-03-16 at 4.15.25 
PM.png

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