Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`gpos` `pos` positional count begins at 1 when should be Pythonic 0

オープン
#76 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

@sadielbartholomew がすでに取り組んでいます。

2024年10月3日 から。

評価

この issue はまだ評価されていません。

説明

code hygiene

The gpos function requires an integer argument pos to define the plot position. The first position is encoded by the value 1, but this is very un-Pythonic, since 0 which encodes the first position for mots of not all Python objects. In practice, this can making programmatic usage awkward, for example when iterating over something to assign sub-plots, a value i + 1 needs to be used instead of simply i, which would be much cleaner and understandable to those reading the code:

for i, proj in enumerate(<variable to change across subplots>):
    cfp.gpos(i + 1)
    <generate sub-plot with given variable choice>

So, we should set the position pos to being at 0 and count from there, not from 1. The pos argument could also be documented much more clearly, so this should be done when this change is made.

主要言語
Python
スター
21
フォーク
11
平均マージ
7時間 11分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NCAS-CMS/cf-plot のほかの issue

NCAS-CMS/cf-plot の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。