GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-113317: Add libclinic.converter and libclinic.crenderdata modules by vstinner · Pull Request #116821 · python/cpython Conversation
|
| # maps strings to callables. | ||
| # these callables must be of the form: | ||
| # def foo(name, default, *, ...) | ||
| # The callable may have any number of keyword-only parameters. | ||
| # The callable must return a CConverter object. | ||
| # The callable should not call builtins.print. | ||
| converters: ConverterDict = {} | ||
|
|
||
| # maps strings to callables. | ||
| # these callables follow the same rules as those for "converters" above. | ||
| # note however that they will never be called with keyword-only parameters. | ||
| legacy_converters: ConverterDict = {} |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
These belong to the Argument Clinic app (or CLI if you will), so IMO they should not be part of the Argument Clinic library. IMO, it is part of the Argument Clinic app config.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to move as much code as possible inside libclinic, including the CLI and "app" logic. Apparently, we have a disagreement on that.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I do not oppose to move the CLI / app into libclinic. What I'm saying is I think the global converters and legacy_converters dicts should be a part of the CLI config.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ok, that makes sense. The practical issue is to reorganize code (move code around) when they are inter-dependenies and most code is left in clinic.py. Code from libclinic/ cannot get code from clinic.py. Once more code will be moved to libclinic, it will be easier to group related code.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* Move CConverter class to a new libclinic.converter module. * Move CRenderData and Include classes to a new libclinic.crenderdata module.
* Move CConverter class to a new libclinic.converter module. * Move CRenderData and Include classes to a new libclinic.crenderdata module.
* Move CConverter class to a new libclinic.converter module. * Move CRenderData and Include classes to a new libclinic.crenderdata module.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.