<?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>はじめに pythonにはmap・filterという関数と、リスト内包表記という独自の記法があります。 どちらを使っても同じようなことができますが、どちらを使うべきなのでしょうか？ 色々な視点から考えてみます。 目次 はじめに 返り値の型 冗長さ 可読性 事故 まとめ スポンサーリンク 返り値の型 map・filterにはmapオブジェクト、filterオブジェクトというジェネレータのようなものを返すという厄介な性質があります。ただしこれはpython3以降の仕様なので、python2を使っている方には当てはまりません（python3とpython2のソースコード互換性に効いてくるので、それは…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhayataka2049.hatenablog.jp%2Fentry%2F2018%2F04%2F22%2F002035&quot; title=&quot;map・filterとリスト内包表記はどちらを使うべきか？ - 静かなる名辞&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-04-22 00:20:35</published>
  <title>map・filterとリスト内包表記はどちらを使うべきか？</title>
  <type>rich</type>
  <url>https://hayataka2049.hatenablog.jp/entry/2018/04/22/002035</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
