<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>podhmo</author_name>
  <author_url>https://blog.hatena.ne.jp/podhmo/</author_url>
  <blog_title>podhmo's diary</blog_title>
  <blog_url>https://pod.hatenablog.com/</blog_url>
  <categories>
    <anon>python</anon>
    <anon>argparse</anon>
  </categories>
  <description>要旨は以下 関数の引数の定義から大まかなデフォルト値とコマンドライン引数を取得 sphinxのautodoc形式のdocstringからヘルプメッセージを作成 以下の様にすると greeting() が関数からコマンドになる。 # -*- coding:utf-8 -*- from cmdfromfn import as_command @as_command def greeting(message, is_surprised=False, name=&quot;foo&quot;): &quot;&quot;&quot; greeting message :param message: message of greeting :param…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpod.hatenablog.com%2Fentry%2F2015%2F09%2F14%2F231122&quot; title=&quot; argparseだるいし。関数の定義からコマンド生成すれば良いのでは？ - podhmo&amp;#39;s diary&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-09-14 23:11:22</published>
  <title> argparseだるいし。関数の定義からコマンド生成すれば良いのでは？</title>
  <type>rich</type>
  <url>https://pod.hatenablog.com/entry/2015/09/14/231122</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
