<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>python高级 on 杨刚的个人网站</title>
    <link>https://www.ygang.top/posts/1b37041b/a64b122d/</link>
    <description>Recent content in python高级 on 杨刚的个人网站</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh</language>
    <copyright>Copyright © 2018-2025 GradyYoung. All rights reserved.</copyright>
    <lastBuildDate>Tue, 22 Apr 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://www.ygang.top/posts/1b37041b/a64b122d/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>1、模块、包</title>
      <link>https://www.ygang.top/posts/1b37041b/a64b122d/91f8d7b5/</link>
      <pubDate>Wed, 09 Apr 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.ygang.top/posts/1b37041b/a64b122d/91f8d7b5/</guid>
      <description>&lt;h2 class=&#34;relative group&#34;&gt;使用模块 
    &lt;div id=&#34;使用模块&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;
    
    &lt;span
        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100&#34;&gt;
        &lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline&#34; href=&#34;#%e4%bd%bf%e7%94%a8%e6%a8%a1%e5%9d%97&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;
    &lt;/span&gt;        
    
&lt;/h2&gt;
&lt;p&gt;编写&lt;code&gt;main.py&lt;/code&gt;&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>2、面向对象</title>
      <link>https://www.ygang.top/posts/1b37041b/a64b122d/30ac5c13/</link>
      <pubDate>Thu, 10 Apr 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.ygang.top/posts/1b37041b/a64b122d/30ac5c13/</guid>
      <description>&lt;h2 class=&#34;relative group&#34;&gt;类 
    &lt;div id=&#34;类&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;
    
    &lt;span
        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100&#34;&gt;
        &lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline&#34; href=&#34;#%e7%b1%bb&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;
    &lt;/span&gt;        
    
&lt;/h2&gt;

&lt;h3 class=&#34;relative group&#34;&gt;声明 
    &lt;div id=&#34;声明&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;
    
    &lt;span
        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100&#34;&gt;
        &lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline&#34; href=&#34;#%e5%a3%b0%e6%98%8e&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;
    &lt;/span&gt;        
    
&lt;/h3&gt;
&lt;p&gt;python2需要在类名后括号内写明父类，python3如果不写后面的括号则默认继承object&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>3、面向对象高级</title>
      <link>https://www.ygang.top/posts/1b37041b/a64b122d/a55a9191/</link>
      <pubDate>Thu, 10 Apr 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.ygang.top/posts/1b37041b/a64b122d/a55a9191/</guid>
      <description>&lt;h2 class=&#34;relative group&#34;&gt;动态绑定属性、方法 
    &lt;div id=&#34;动态绑定属性方法&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;
    
    &lt;span
        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100&#34;&gt;
        &lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline&#34; href=&#34;#%e5%8a%a8%e6%80%81%e7%bb%91%e5%ae%9a%e5%b1%9e%e6%80%a7%e6%96%b9%e6%b3%95&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;
    &lt;/span&gt;        
    
&lt;/h2&gt;
&lt;p&gt;正常情况下，当我们定义了一个class，创建了一个class的实例后，我们可以给该实例绑定任何属性和方法，这就是动态语言的灵活性。&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>4、异常、日志</title>
      <link>https://www.ygang.top/posts/1b37041b/a64b122d/04d49706/</link>
      <pubDate>Tue, 22 Apr 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.ygang.top/posts/1b37041b/a64b122d/04d49706/</guid>
      <description>&lt;h2 class=&#34;relative group&#34;&gt;try-except-finally 
    &lt;div id=&#34;try-except-finally&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;
    
    &lt;span
        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100&#34;&gt;
        &lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline&#34; href=&#34;#try-except-finally&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;
    &lt;/span&gt;        
    
&lt;/h2&gt;
&lt;p&gt;可以通过&lt;code&gt;try-except-finally&lt;/code&gt;对错误进行捕获和处理&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>5、IO流</title>
      <link>https://www.ygang.top/posts/1b37041b/a64b122d/bfb2f662/</link>
      <pubDate>Tue, 22 Apr 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.ygang.top/posts/1b37041b/a64b122d/bfb2f662/</guid>
      <description>&lt;h2 class=&#34;relative group&#34;&gt;File 
    &lt;div id=&#34;file&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;
    
    &lt;span
        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100&#34;&gt;
        &lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline&#34; href=&#34;#file&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;
    &lt;/span&gt;        
    
&lt;/h2&gt;
&lt;p&gt;Python内置的&lt;code&gt;open()&lt;/code&gt;函数，传入文件名和标示符，&lt;code&gt;open()&lt;/code&gt;将会返回一个File对象，完整的语法格式如下：&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>6、多线程</title>
      <link>https://www.ygang.top/posts/1b37041b/a64b122d/fc2f0203/</link>
      <pubDate>Sat, 11 Nov 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.ygang.top/posts/1b37041b/a64b122d/fc2f0203/</guid>
      <description>&lt;h2 class=&#34;relative group&#34;&gt;创建线程 
    &lt;div id=&#34;创建线程&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;
    
    &lt;span
        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100&#34;&gt;
        &lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline&#34; href=&#34;#%e5%88%9b%e5%bb%ba%e7%ba%bf%e7%a8%8b&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;
    &lt;/span&gt;        
    
&lt;/h2&gt;
&lt;p&gt;由于线程是操作系统直接支持的执行单元，因此，高级语言通常都内置多线程的支持，Python也不例外，并且，Python的线程是真正的Posix Thread，而不是模拟出来的线程。&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>7、网络编程</title>
      <link>https://www.ygang.top/posts/1b37041b/a64b122d/9ee4721e/</link>
      <pubDate>Sat, 11 Nov 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.ygang.top/posts/1b37041b/a64b122d/9ee4721e/</guid>
      <description>&lt;h2 class=&#34;relative group&#34;&gt;基本概念 
    &lt;div id=&#34;基本概念&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;
    
    &lt;span
        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100&#34;&gt;
        &lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline&#34; href=&#34;#%e5%9f%ba%e6%9c%ac%e6%a6%82%e5%bf%b5&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;
    &lt;/span&gt;        
    
&lt;/h2&gt;
&lt;p&gt;计算机为了联网，就必须规定通信协议，早期的计算机网络，都是由各厂商自己规定一套协议，IBM、Apple和Microsoft都有各自的网络协议，互不兼容，这就好比一群人有的说英语，有的说中文，有的说德语，说同一种语言的人可以交流，不同的语言之间就不行了。&lt;/p&gt;</description>
      
    </item>
    
  </channel>
</rss>
