python-fire icon indicating copy to clipboard operation
python-fire copied to clipboard

Simple implementation of allowing externally defined formatters

Open monkut opened this issue 8 years ago • 2 comments

I noticed there is a TODO in _PrintResult to provide better handling of output formatting, but this is a quick an easy way to allow end-users to provide their own defined formatters.

For your consideration.

In response to raised issue #74

monkut avatar May 23 '17 06:05 monkut

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

googlebot avatar May 23 '17 06:05 googlebot

FYI objects that defines a custom __str__ method are now serialized using that custom __str__ method.

dbieber avatar Feb 28 '20 17:02 dbieber

Thanks for the PR. Closing as this is now obsolete.

We eventually added this functionality (years after your original PR) in https://github.com/google/python-fire/pull/345 They key word arg is serialize.

dbieber avatar Dec 09 '22 20:12 dbieber