biqqles

Results 26 comments of biqqles

Interesting, I was searching for solutions to this and found that attrs had the same issue https://github.com/python-attrs/attrs/issues/102. I didn't even know it supported slots! The fix is messy, but I...

Thanks for the info @tirkarthi, I knew from the PEP what to put in the attribute but didn't realise dataclasses had a decorator option for it. Not sure why, seems...

I see. `kw_only` is trivial to add. I shall have to benchmark `slots` when Python 3.10 is released. btw, 3.10 not being released yet means I see the "implements all...

I set up a new branch [`3.10-equivalence`](https://github.com/biqqles/dataclassy/tree/3.10-equivalence) to track the addition of the new decorator options.

No, it's not already possible. I originally didn't want to implement something like `late_init` (taking the name from Kotlin) because I think it means checking the type before generating `__init__`...

As I see it there are three possibilities that explain this (ranked in order of my guesses at likelihood): 1) The implementation of `typing.Generic` changed between 3.6 and 3.7. I...

MRE: ```python from typing import Generic, TypeVar from dataclassy import dataclass X = TypeVar('X') @dataclass class T(Generic[X]): ... ```

Diff: https://github.com/python/cpython/compare/v3.6.14...v3.7.10 Unfortunately I can't find a way to link to the single file `typing.py`.

Great find. The [3.7 release notes](https://docs.python.org/3/whatsnew/3.7.html#pep-560-core-support-for-typing-module-and-generic-types) are a little more blunt: > the generic types can be used without metaclass conflicts This kind of makes me want to say it's...

I have a fix for this but need to clean it up and post a PR. The relevant code is as expected in `Message#initialize`.