<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Python on Shiglass</title>
    <link>https://hirotoshimizu.github.io/tags/python/</link>
    <description>Recent content in Python on Shiglass</description>
    <generator>Hugo -- gohugo.io</generator>
    <lastBuildDate>Mon, 28 Feb 2022 14:54:25 +0900</lastBuildDate><atom:link href="https://hirotoshimizu.github.io/tags/python/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Callable</title>
      <link>https://hirotoshimizu.github.io/posts/callable/</link>
      <pubDate>Mon, 28 Feb 2022 14:54:25 +0900</pubDate>
      
      <guid>https://hirotoshimizu.github.io/posts/callable/</guid>
      <description>Callable は type hint で関数で呼び出すことが出来る。
class PaymentProcessor: def __init__(self, authorize_type: str): if authorizer_type == &amp;#39;sms&amp;#39;: self.authorize = authorize_sms elif authorizer_type == &amp;#39;email&amp;#39;: self.authorize = authorize_email Callable の使い方は list に　実引数のリスト と 返り値の型 を記載する。
Callable[[引数], 返り値] AuthorizeFunction = Callable[[], bool] class PaymentProcessor: def __init__(self, authorize: AuthorizerFunction): self.authorize = authorize </description>
    </item>
    
  </channel>
</rss>
