Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is there a "dynamic inline table" when you normally want a static type to do dumping? #401

Open
goodboy opened this issue Jun 18, 2022 · 1 comment

Comments

@goodboy
Copy link

goodboy commented Jun 18, 2022

After much pain and anguish i'd sure like to know why this code exists.

It entirely breaks your encoding lookup table (if you try to use it) and just generally makes all of your .dump_sections() code more or less an adhoc mess for anyone that wants to write "inline tables" (aka in #384, #396).

I can't seem to find much argument in any of the encoder code for why there is this weird "special encoders" stuff either, when most of the overloads are just for stuff that could be covered by the TomlEncoder.dump_funcs system anyway.. or at the least pick whether you want flags or subclassing..

Seems like there's a whole lot of design bypassing and just general strange choices for the lack-of-symmetry between the encoding and decoding system.

@goodboy
Copy link
Author

goodboy commented Jun 18, 2022

lol, i mean this docstring isn't even anywhere near right. what's the reason it isn't already inheriting from dict..i'd sure love to know 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant