<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tedd707</author_name>
  <author_url>https://blog.hatena.ne.jp/tedd707/</author_url>
  <blog_title>ITエンジニアが仕事に対して思うこと</blog_title>
  <blog_url>https://pythonjp.ikitai.net/</blog_url>
  <categories>
  </categories>
  <description>## Pythonにおいて、classmethod()とstaticmethod()は、クラス内のメソッドを定義する際に使用されるデコレータです。これらは通常のメソッドと異なり、クラス全体やクラス自体に対して働く特殊なメソッドとなります。以下でそれぞれの使い方と違いについて詳しく説明します。 1. classmethod() classmethod()デコレータは、メソッドがクラス自体に対して動作するようにします。通常のメソッドはインスタンスに対して操作しますが、classmethod()を使うことで、クラスに対してアクセスできるようになります。また、第一引数としてクラスが渡されます（通常、c…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpythonjp.ikitai.net%2Fentry%2F2024%2F01%2F27%2F122806&quot; title=&quot; Python: classmethod() と staticmethod() の使い方と違い - ITエンジニアが仕事に対して思うこと&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>2024-01-27 12:28:06</published>
  <title> Python: classmethod() と staticmethod() の使い方と違い</title>
  <type>rich</type>
  <url>https://pythonjp.ikitai.net/entry/2024/01/27/122806</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
