「Python3(2)」

・[%322]を更新
%320:
「Python3(2)」

%321:https://docs.python.org/ja/3/tutorial/」の備忘録
`▼
--------------------------------------------------------------------------------
§4.2. for】
・Python の for 文は、任意のシーケンス型 (リストまたは文字列)
にわたって反復を行います。
・数列にわたって反復を行う必要がある場合、組み込み関数 range() が便利です。
・あるシーケンスにわたってインデクスで反復を行うには、
 range() と len() を次のように組み合わせられます:
・しかし、多くの場合は enumerate() 関数を使う方が便利です。
 ループのテクニック を参照してください。
 range() が返すオブジェクトは、いろいろな点でリストであるかのように振る舞いますが、本当はリストではありません。
データ構造 の章では、 list() についてより詳細に議論します。
§4.5. pass 文】
・pass 文は何もしません。
 pass は、文を書くことが構文上要求されているが、
プログラム上何の動作もする必要がない時に使われます:
・pass のもう 1 つの使い道は、新しいコードを書いているときの関数や条件文の
 仮置きの本体としてです。
§4.6. 関数を定義する】
・def は関数の 定義 (definition) を導くキーワードです。
  def の後には、関数名と仮引数を丸括弧で囲んだリストを続けなければなりません。
・関数を 実行 (execution) するとき、
 その値はすべてこのローカルなシンボルテーブルに記憶されます。
・関数を呼び出す際の実際の引数 (実引数) は、
 関数が呼び出されるときに関数のローカルなシンボルテーブル内に取り込まれます。
・ある関数がほかの関数を呼び出すときには、新たな呼び出しのために
 ローカルなシンボルテーブルが新たに作成されます。
§4.7. 関数定義についてもう少し】
可変個の引数を伴う関数を定義することもできます。
・引数の定義方法には 3 つの形式があり、
--------------------------------------------------------------------------------
`▲

%322:「sphinx」
`▼

--------------------------------------------------------------------------------
(0)「Python7」の「`」や「_」をシアンに着色したい. 
(1)参考資料
 ①「http://www.tohoho-web.com/python/sphinx.html
 ②「https://qiita.com/kazetof/items/d410dae312d56b7324c0
 ③「https://postd.cc/restructuredtext-vs-markdown-for-technical-documentation/
(2)「(1)①」からの引用/*「2019年10月20日」*/
  /*〔「(1)①」`in_「http://www.tohoho-web.com/python/tools.html」〕*/
・Sphinxをインストールする
・静的コンテンツをドキュメント化する
 /*〔「ReStructuredText_Formatファイル.RST拡張子」〕*/
・複数HTML以外の形式にビルドする
・テーマを変更する
・Pythonドキュメントを組み込む
(3)
--------------------------------------------------------------------------------`▲①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳

%637:Note in English
`▼
--------------------------------------------------------------------------------
(0)【[%631](2)】is explained as follows
 ①「□0」is an ASCII_string.
 ②〔「□1」⇒「□2」〕means that「□2」is replaced by「□1」.
 ③〔「□1」⇔「□2」〕means that「□2」is equivalent to「□1」.
 ④「'□0'」⇒「'□0'_」,「"□0"」⇒「"□0"_」.
  「''''_」⇒「'""'_」==「'\0'_」==「chr(0)」
 ⑤Let「□0」be a token ,which is expressed as「`□0_    」
  in order to simplify「lexical analysis★」./*「(2)②」*/
★https://en.wikipedia.org/wiki/Lexical_analysis
 ⑥Non-proportional font「Courier」is selected to express「□0」.
  Background color cyan can be is used optionary in order to clarify syntax.
 ⑦Any block「{□}」must be expressed as「`{_□`}_」with「`」and「_」.
  ・「d = `{_'Yamada': 30,_ 'Suzuki': 40,_ 'Tanaka': 80`}_」
(1)Any script in accordance with「(0)」reduced to that of Tiny Python,
  if every 「`」and「_」are replaced by「chr(32)」.
(2)Notation of operator「□0」such as「0,_1」and「1.0,_2」is simple and
  easy to use
  ・「not,_1」
  ・「1.and,_2」⇔「1 & 2」/*「bitwise operation」*/
  ・「1.or,_2」 ⇔「1 | 2」/*「bitwise operation」*/
  ・「1.xor,_2」⇔「1 ^ 2」/*「bitwise operation」*/
  ・「1.ge,_2」⇔「1≧2」
  ・「1.lt,_2」⇔「1<2」
  ・「1.le,_2」⇔「1≦2」
  ・「1.gt,_2」⇔「1>2」
  ・「1.ge,_2」⇔「1≧2」
(3)Notations defined by Python.org are not changed.
  ・「1 `in_ 2」⇔「1 in 2」
  ・「1 `and_ 2」⇔「1 and 2」
  ・
--------------------------------------------------------------------------------
`▲∈∋⊆⊇⊂⊃∪∩∧∨¬⇒⇔∀∃+-±×÷=≠<>≦≧

%323:EOF(@L26)

コメント

このブログの人気の投稿

「日記帳(2023 冬)」

ブログの教材で学ぶMATH(1)