On 12/29/2020 3:04 PM, Anton Abrosimov wrote:
Way 5: Add default `False` `iter` flag to `dataclass` decorator.

```
  def __iter__(self) :
         return ((f.name, getattr(axes, f.name)) for f in fields(axes))
```

And use: `plot(**dict(axes))`

I'd suggest you just write your own function to do this. I consider adding dataclasses.asdict and .astuple to be mistakes.

Eric
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/LIPNSZ2DNK54WKTVC5MAE64ZAXP5PADL/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to