You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't really like this idea because it will make the command_line.py module too complicated. We would have to translate the arguments to number choices and I think that would be a bit too hard to debug for people using predetermined arguments. Keep in mind that if this proposal is accepted, we will have to make sure all future modules have this translation. We will also have to find the right order of the arguments before translation.
I feel like the alternative to translating the parameters isn't much better as it would involve extensively modifying all modules and/or the main command_line.py module.
Delegating the named argument to the function would be the way to make this optional, in the example, sendres as its not a number would start the section for the named arguments and then pop the inputs until another delimiter is found, since we're dealing with named args then any arg without a name can be the ending delimiter.
this subsection would be parsed and sent to the function as **kwargs and the function would check for them to modify its own behaviour, it'd be entirely optional for the author to make args for his own function.
I feel like the project would benefit from having named arguments
example:
ikabot login passwd sendres --from city1 --to city2 --resource wine --amount 50000
Easy to understand and not that hard to add as an optional form to not break backwards compatibility
The text was updated successfully, but these errors were encountered: