CoBrALab / qbatch

The Unlicense
27 stars 13 forks source link

Alternate implementation of default arguments: document in description and set post-argparse #85

Open gdevenyi opened 8 years ago

gdevenyi commented 8 years ago

See comment here: http://python.6.x6.nabble.com/argparse-tell-if-arg-was-defaulted-tp1528162p1528165.html

This means having unset defaults in argparse, and then setting the values after parsing by checking for none.

I think this would resolve the chunk_size and ppj metaprogramming, my issues with the list appending, and possible other magics in a saner way.

Thoughts?

pipitone commented 8 years ago

I considered this, but then the default isn't shown in the help. We could write it into the help ourselves, I suppose.

gdevenyi commented 8 years ago

That's what my thought was. I think that would make the code quite a bit cleaner.

pipitone commented 8 years ago

That's what my thought was. I think that would make the code quite a bit cleaner.

Ah, I see now you had this idea in the issue title. :-)

pipitone commented 8 years ago

I'm good with this.