The proposed implementation of dataclasses prevents defining fields with
defaults before fields without defaults. This can create limitations on
logical grouping of fields and on inheritance.
Take, for example, the case:
@dataclass
class Foo:
some_default: dict = field(default_factory=dict)
On 20 January 2018 at 04:39, Chris Barker wrote:
> So maybe the way to go is to come up with recommendations for a standard way
> to do it -- maybe published by PyPa?
I don't think the trade-offs here are clear enough for us to add an
opinionated guide to packaging.python.org, but it could be an
I don't really understand what you're doing when you take a fragment of my
sentence where I explain a wrong understanding of WHATWG encodings, and say
"that's wrong, as you explain". I know it's wrong. That's what I was saying.
You quoted the part where I said "Filling in all the gaps with Latin-1
On Mon, Jan 22, 2018 at 09:20:16AM -0500, Yahya Abou 'Imran via Python-ideas
wrote:
> On top of this old proposition:
> https://bugs.python.org/issue13290
>
> We could have a __vars__ method that would be called by vars() if defined.
> The use cases:
>
> 1. let vars() work with instances without
On top of this old proposition:
https://bugs.python.org/issue13290
We could have a __vars__ method that would be called by vars() if defined.
The use cases:
1. let vars() work with instances without __dict__;
2. hide some attributes from the public API.
Example for 1:
class C:
__slots__