<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>minus9d</author_name>
  <author_url>https://blog.hatena.ne.jp/minus9d/</author_url>
  <blog_title>minus9d's diary</blog_title>
  <blog_url>https://minus9d.hatenablog.com/</blog_url>
  <categories>
    <anon>python</anon>
  </categories>
  <description>Python 3にて以下のように例外オブジェクトをprint()するコード try: raise ValueError except Exception as e: print(e) を実行しても、以下のように何も出力されません。 結論からいうと、上記のコードを以下のように修正すると try: raise ValueError('value error has occured') except Exception as e: print(e) 以下の様に出力されるようになります。 value error has occured これはなぜかを説明していきます。 Pythonのraise文で投げ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fminus9d.hatenablog.com%2Fentry%2F2020%2F09%2F27%2F180129&quot; title=&quot;Pythonのexceptionをprint()して何も出ない原因 - minus9d&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>2020-09-27 18:01:29</published>
  <title>Pythonのexceptionをprint()して何も出ない原因</title>
  <type>rich</type>
  <url>https://minus9d.hatenablog.com/entry/2020/09/27/180129</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
