<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>异步编程 on 知行 - 大道至简，知易行难；道阻且长，行则将至。</title>
    <link>https://blog.itdn.top/tags/%E5%BC%82%E6%AD%A5%E7%BC%96%E7%A8%8B/</link>
    <description>Recent content in 异步编程 on 知行 - 大道至简，知易行难；道阻且长，行则将至。</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-CN</language>
    <copyright>郑超(Charles·Zheng)</copyright>
    <lastBuildDate>Mon, 02 Jun 2025 18:22:17 +0000</lastBuildDate><atom:link href="https://blog.itdn.top/tags/%E5%BC%82%E6%AD%A5%E7%BC%96%E7%A8%8B/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>「学习笔记」Python进阶编程（上）</title>
      <link>https://blog.itdn.top/posts/2025/python_advanced_1/</link>
      <pubDate>Mon, 02 Jun 2025 18:22:17 +0000</pubDate>
      
      <guid>https://blog.itdn.top/posts/2025/python_advanced_1/</guid>
      <description>
        
          
            1、类型注解 在基础篇中我们学习了Python的动态类型特性，类型注解 是Python 3.5+引入的特性，允许为变量、函数参数和返回值添加类型提示。
类型注解提供了以下好处：
代码可读性：明确说明变量和函数的预期类型 IDE支持：提供更好的代码补全和错误提示 类型检查：可以使用mypy等工具进行静态类型检查 文档生成：自动生成API文档 1.1 基本类型 # ========== 基本类型注解 ========== # 变量类型注解：变量名: 类型 = 值 name: str = &amp;#34;Alice&amp;#34; # 字符串类型 age: int = 30 # 整数类型 is_student: bool = False # 布尔类型 scores: list = [95, 88, 91] # 列表类型 # 函数类型注解：参数: 类型, 返回值 -&amp;gt; 类型 def greet(name: str) -&amp;gt; str: &amp;#34;&amp;#34;&amp;#34;向用户打招呼&amp;#34;&amp;#34;&amp;#34; return f&amp;#34;Hello, {name}&amp;#34; # 注意： # - 类型注解只是提示，Python解释器不会强制检查 # - 需要使用第三方工具（如mypy）进行类型检查 # - 类型注解可以提高代码质量，但不会影响运行时行为 1.
          
          
        
      </description>
    </item>
    
  </channel>
</rss>
