Skip to content

Commit

Permalink
doc: update docs/python.md (#405) 5b11b6e
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jul 31, 2023
1 parent 0153929 commit edb076a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
10 changes: 5 additions & 5 deletions CONTRIBUTORS.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/python.html
Original file line number Diff line number Diff line change
Expand Up @@ -952,11 +952,11 @@ <h4 id="读取对象"><a aria-hidden="true" tabindex="-1" href="#读取对象"><
</span><span class="code-line"><span class="token keyword">print</span><span class="token punctuation">(</span>string <span class="token operator">*</span> times<span class="token punctuation">)</span> <span class="token comment"># => hahaha</span>
</span></code></pre>
</div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="变量-2"><a aria-hidden="true" tabindex="-1" href="#变量-2"><span class="icon icon-link"></span></a>变量</h3><div class="wrap-body">
<pre class="language-python"><code class="language-python code-highlight"><span class="code-line">result<span class="token punctuation">:</span> <span class="token builtin">int</span> <span class="token operator">=</span> <span class="token number">1</span> <span class="token operator">+</span> <span class="token number">2</span>
<pre class="language-python"><code class="language-python code-highlight"><span class="code-line">result<span class="token punctuation">:</span> <span class="token builtin">str</span> <span class="token operator">=</span> <span class="token number">1</span> <span class="token operator">+</span> <span class="token number">2</span>
</span><span class="code-line">
</span><span class="code-line"><span class="token keyword">print</span><span class="token punctuation">(</span>result<span class="token punctuation">)</span> <span class="token comment"># => 3</span>
</span></code></pre>
<p>虽然标注了错误的类型,但不影响正常运行</p>
<p>错误的类型标注不会影响正常运行,也不会报错</p>
</div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="参数"><a aria-hidden="true" tabindex="-1" href="#参数"><span class="icon icon-link"></span></a>参数</h3><div class="wrap-body">
<pre class="language-python"><code class="language-python code-highlight"><span class="code-line"><span class="token keyword">def</span> <span class="token function">say</span><span class="token punctuation">(</span>name<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> start<span class="token punctuation">:</span> <span class="token builtin">str</span> <span class="token operator">=</span> <span class="token string">"Hi"</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
</span><span class="code-line"> <span class="token keyword">return</span> start <span class="token operator">+</span> <span class="token string">", "</span> <span class="token operator">+</span> name
Expand Down
8 changes: 7 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,9 @@
<a href="https://github.com/xing133" title="xing133">
<img src="https://avatars.githubusercontent.com/u/5336490?v=4" width="42;" alt="xing133">
</a>
<a href="https://github.com/hiyms" title="yms">
<img src="https://avatars.githubusercontent.com/u/84654050?v=4" width="42;" alt="yms">
</a>
<a href="https://github.com/zxx457" title="zxx457">
<img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx457">
</a>
Expand All @@ -1088,6 +1091,9 @@
<a href="https://github.com/qwxingzhe" title="行者">
<img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者">
</a>
<a href="https://github.com/binscor" title="郑乃斌">
<img src="https://avatars.githubusercontent.com/u/37325821?v=4" width="42;" alt="郑乃斌">
</a>
<a href="https://github.com/Zeng-qh" title="都一样">
<img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样">
</a><!--GAMFC-END-->
Expand Down Expand Up @@ -1295,7 +1301,7 @@
<!--rehype:class=home-card home-links-->
<p>如果你有资源,可以很方便<a href="https://github.com/jaywcjlove/reference/issues/102#issue-1451649637">部署 web 版</a>,这非常简单,只需要克隆 <a href="https://github.com/jaywcjlove/reference/tree/gh-pages">gh-pages</a> 分支代码到你的静态服务就可以了,还可以使用 <a href="https://hub.docker.com/r/wcjiang/reference">docker</a> 快捷部署 web 版。</p>

</div></div><div class="h2wrap-body"></div></div></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 Kenny Wang. Updated on 2023/07/30 02:43:03</footer></footer><script src="data.js?v=1.4.1" defer></script><script src="js/fuse.min.js?v=1.4.1" defer></script><script src="js/main.js?v=1.4.1" defer></script><div id="mysearch"><div class="mysearch-box"><div class="mysearch-input"><div><svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 18 18">
</div></div><div class="h2wrap-body"></div></div></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 Kenny Wang. Updated on 2023/07/31 08:49:47</footer></footer><script src="data.js?v=1.4.1" defer></script><script src="js/fuse.min.js?v=1.4.1" defer></script><script src="js/main.js?v=1.4.1" defer></script><div id="mysearch"><div class="mysearch-box"><div class="mysearch-input"><div><svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 18 18">
<path fill="currentColor" d="M17.71,16.29 L14.31,12.9 C15.4069846,11.5024547 16.0022094,9.77665502 16,8 C16,3.581722 12.418278,0 8,0 C3.581722,0 0,3.581722 0,8 C0,12.418278 3.581722,16 8,16 C9.77665502,16.0022094 11.5024547,15.4069846 12.9,14.31 L16.29,17.71 C16.4777666,17.8993127 16.7333625,18.0057983 17,18.0057983 C17.2666375,18.0057983 17.5222334,17.8993127 17.71,17.71 C17.8993127,17.5222334 18.0057983,17.2666375 18.0057983,17 C18.0057983,16.7333625 17.8993127,16.4777666 17.71,16.29 Z M2,8 C2,4.6862915 4.6862915,2 8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 Z"></path>
</svg><input id="mysearch-input" type="search" placeholder="搜索" autocomplete="off"><div class="mysearch-clear"></div></div><button id="mysearch-close" type="button">搜索</button></div><div class="mysearch-result"><div id="mysearch-menu"></div><div id="mysearch-content"></div></div></div></div></body>
</html>

0 comments on commit edb076a

Please sign in to comment.