<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hayataka2049</author_name>
  <author_url>https://blog.hatena.ne.jp/hayataka2049/</author_url>
  <blog_title>静かなる名辞</blog_title>
  <blog_url>https://hayataka2049.hatenablog.jp/</blog_url>
  <categories>
    <anon>python</anon>
    <anon>Tips</anon>
    <anon>ネタ・小ネタ</anon>
  </categories>
  <description>はじめに 関数の呼び出し回数を数える、というのは割とよくあるサンプルプログラムです。 C言語で言うstaticなローカル変数を使うやつです。 #include &lt;stdio.h&gt; void f(void) { static int i = 0; i++; printf(&quot;%d\n&quot;, i); } int main(void) { f(); f(); f(); } /* result 1 2 3 */ こんなの書いて面白いの？ といった声もあるかと思いますが、pythonだと何通りも書き方があって面白いのです。たった一つの冴えたやり方？ うるせーな。 何通りもある書き方について、それぞれ説明して…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhayataka2049.hatenablog.jp%2Fentry%2F2018%2F10%2F22%2F003414&quot; title=&quot;【python】呼び出し回数カウント関数を色々な方法で作る - 静かなる名辞&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>2018-10-22 00:34:14</published>
  <title>【python】呼び出し回数カウント関数を色々な方法で作る</title>
  <type>rich</type>
  <url>https://hayataka2049.hatenablog.jp/entry/2018/10/22/003414</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
