ã¯ããã« ããããããèªçæ¥ããã§ã¨ããããã¾ãï¼ nikkieã§ãã Pythonã®åãã³ãã®ä¸ã§ããã¤ããªã¨æãã¦ããtyping.TypeVarã¨ä»²è¯ããªãä¸æ©ç®ãè¸ã¿åºããã¨æãã¾ãï¼ ç®æ¬¡ ã¯ããã« ç®æ¬¡ åãã³ãå ¥éã§è¦ãããã³ã¼ãï¼2ã¤ã®æååãå¼æ°ã«åããæååãè¿ãé¢æ°ï¼ åå¤æ°ï¼TypeVarï¼ã®åºçª ã¼ 2ã¤ã®Tåãå¼æ°ã«åããTåãè¿ãé¢æ° int | strã§ã¯ãã¡ãªã®ãï¼ ãããã¹ãPythonããåããããã Python 3.12以éã§ã¯ çµããã« åãã³ãå ¥éã§è¦ãããã³ã¼ãï¼2ã¤ã®æååãå¼æ°ã«åããæååãè¿ãé¢æ°ï¼ åãã³ããæ¸ãå§ããã¨ãã«åºä¼ã£ãã³ã¼ãããå§ãã¾ãããã ä¾ãã°ãã¿ããªã®Pythonåå¼·ä¼#74ï¼2021å¹´ï¼ãã def add(a: str, b: str) -> str: return a + b add(2, 3) add(
{{#tags}}- {{label}}
{{/tags}}