<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>junichim</author_name>
  <author_url>https://blog.hatena.ne.jp/junichim/</author_url>
  <blog_title>プログラマーのメモ書き</blog_title>
  <blog_url>https://blog.mori-soft.com/</blog_url>
  <categories>
    <anon>python</anon>
  </categories>
  <description>最近 python で遊ぶときは、型ヒントをつけながらいろいろと試しています。 もともとは、クラス定義の時、自分自身を指定することができないようです（下記の前方参照）を参照 [翻訳] PEP 0484 -- 型ヒント (Type Hints) - Qiita で、Python 3.11 から、自分自身のクラスを表すことができる typing.Self が使えるようになるとのことだったので、早速試してみました。 こういう Self は、あるクラスが同じクラスおよびそれの派生クラスを保持するようなデータ構造を扱うような場合に、よくでてくるかと思います。 from typing import Sel…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.mori-soft.com%2Fentry%2F2023%2F06%2F09%2F225535&quot; title=&quot;Python 3.11 の typing.Self を使ってみた - プログラマーのメモ書き&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>https://cdn-ak.f.st-hatena.com/images/fotolife/j/junichim/20230608/20230608224722.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-06-09 22:55:35</published>
  <title>Python 3.11 の typing.Self を使ってみた</title>
  <type>rich</type>
  <url>https://blog.mori-soft.com/entry/2023/06/09/225535</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
